Wednesday, November 28, 2018

Grepping for non-ascii-chars

https://stackoverflow.com/questions/3001177/how-do-i-grep-for-all-non-ascii-characters#comment18815407_9395552

  • @BastiaanVanDeWeerd is correct, grep on OSX 10.8 no longer supports PCRE ("Perl-compatible regular expressions") as Darwin now uses BSD grep instead of GNU grep. An alternative to installing the dupeslibrary is to install pcre instead: brew install pcre... as part of this, you will get the pcregreputility, which you can use as follows: pcregrep --color='auto' -n "[\x80-\xFF]" file.xml – pvandenberk Dec 4 '12 at 11:24 

No comments:

Post a Comment