Next: , Previous: grep regular expression syntax, Up: Regular Expressions

8.5.7 ‘posix-awk’ regular expression syntax

The character ‘.’ matches any single character except the null character.

matches a ‘+
matches a ‘?’.


GNU extensions are not supported and so ‘\w’, ‘\W’, ‘\<’, ‘\>’, ‘\b’, ‘\B’, ‘\`’, and ‘\'’ match ‘w’, ‘W’, ‘<’, ‘>’, ‘b’, ‘B’, ‘`’, and ‘'’ respectively.


The alternation operator is ‘|’.


*’, ‘+’ and ‘?’ are special at any point in a regular expression except the following places, where they are not allowed:

  1. At the beginning of a regular expression
  2. After an open-group, signified by ‘(
  3. After the alternation operator ‘|

Intervals are specified by ‘{’ and ‘}’. Invalid intervals such as ‘a{1z’ are not accepted.
