What flavour of regular expression is grep?

Default GNU grep behavior is to use a slightly flavorful variant on POSIX basic regular expressions, with a similarly tweaked species of POSIX extended regular expressions for egrep (usually an alias for grep -E). POSIX ERE is what PHP ereg() uses. GNU grep also claims to support grep -P for PCRE, by the way. So … Read more

How to search for non-ASCII characters with bash tools?

Try: nonascii() { LANG=C grep –color=always ‘[^ -~]\+’; } Which can be used like: printf ‘ŨTF8\n’ | nonascii Within [] ^ means “not”. So [^ -~] means characters not between space and ~. So excluding control chars, this matches non ASCII characters, and is a more portable though slightly less accurate version of [^\x00-\x7f] below. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)