Regular Expression
Regular Expressions
-
POSIX Basic Regular Expression
- grep
-
POSIX Extended Regular Expression
- egrep
- awk
- emacs
GNU Extensions
Shorthand Classes
shorthand | equivalence |
---|---|
\w |
[[:alnum:]_] |
\W |
[^[:alnum:]_] |
\s |
[[:space:]] |
\S |
[^[:space:]] |
Word Boundaries
shorthand | matches |
---|---|
\b |
position at a word boundary |
\B |
position not at a word boundary |
\< |
position at the start of a word |
\> |
position at the end of a word |
\` (backtick) |
position at the start of subject string |
\' (single quote) |
position at the end of subject string |