Created
September 16, 2019 23:46
-
-
Save kevinhooke/8b6e990bf2f1a8a60ac7da598eaedbb2 to your computer and use it in GitHub Desktop.
MacOS and Perl Compatible Regular Expressions (PCRE)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See https://www.unix.com/unix-for-advanced-and-expert-users/131088-grep-character-classes-w-d.html | |
Perl character classes like \w, \d are not supported by default in MacOS BSD style utils like grep, use POSIX classes | |
instead: | |
\w == [:alpha:] | |
[\w\d] == [:alnum:] | |
\d == [:digit:] | |
[\s\t] == [:blank:] | |
Also see: https://www.regular-expressions.info/posixbrackets.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment