find: awk regular expression syntax
1
1 8.5.2 'awk' regular expression syntax
1 -------------------------------------
1
1 The character '.' matches any single character except the null
1 character.
1
1 '+'
1 indicates that the regular expression should match one or more
1 occurrences of the previous atom or regexp.
1 '?'
1 indicates that the regular expression should match zero or one
1 occurrence of the previous atom or regexp.
1 '\+'
1 matches a '+'
1 '\?'
1 matches a '?'.
1
1 Bracket expressions are used to match ranges of characters. Bracket
1 expressions where the range is backward, for example '[z-a]', are
1 invalid. Within square brackets, '\' can be used to quote the following
1 character. Character classes are supported; for example '[[:digit:]]'
1 will match a single decimal digit.
1
1 GNU extensions are not supported and so '\w', '\W', '\<', '\>', '\b',
1 '\B', '\`', and '\'' match 'w', 'W', '<', '>', 'b', 'B', '`', and '''
1 respectively.
1
1 Grouping is performed with parentheses '()'. An unmatched ')'
1 matches just itself. A backslash followed by a digit matches that
1 digit.
1
1 The alternation operator is '|'.
1
1 The characters '^' and '$' always represent the beginning and end of
1 a string respectively, except within square brackets. Within brackets,
1 '^' can be used to invert the membership of the character class being
1 specified.
1
1 '*', '+' and '?' are special at any point in a regular expression
1 except:
1
1 1. At the beginning of a regular expression
1
1 2. After an open-group, signified by '('
1 3. After the alternation operator '|'
1
1 The longest possible match is returned; this applies to the regular
1 expression as a whole and (subject to this constraint) to subexpressions
1 within groups.
1