tag:blogger.com,1999:blog-6637736252081011583.post7052897921911025057..comments2023-10-23T11:13:47.199-07:00Comments on Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Stripping Non-Printable CharactersTravis Whittonhttp://www.blogger.com/profile/14592647486468034166noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6637736252081011583.post-58904026191720879702008-04-21T07:30:00.000-07:002008-04-21T07:30:00.000-07:00Good point... I guess I'm a sucker for doing thing...Good point... I guess I'm a sucker for doing things the hard way. I'll update the tip because this is definitely an easier approach. Thanks!Travis Whittonhttps://www.blogger.com/profile/14592647486468034166noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-84259284721027680542008-04-18T18:56:00.000-07:002008-04-18T18:56:00.000-07:00Doesn't the [:print:] Unicode character class capt...Doesn't the [:print:] Unicode character class capture the printable characters? So then the nonprintable ones would be [^[:print:]], and you could delete them with<BR/><BR/>$val = preg_replace( '/[^[:print:]]/', '', $val )<BR/><BR/>No?Steve Lanielhttps://www.blogger.com/profile/15382641193477770243noreply@blogger.com