unix regex

regex featureBREsEREs
dot, ^, $, [ ], [^ ]
"any number" quantifier**
+ and ? quantifiers+ ?
range quantifier\{min, max\}{min, max}
grouping\( \)( )
can apply quantifiers to parentheses
backreferences\1 through \9
alternation
homemahmoozbrainresources/masteringregularexpressions.pdf
regex table
regexmatchexample pattern
[0-9] \da single digit
[A-Z]an upper case letter
[a-z]a lower case letter
^start of line
\$end of line
\bword boundary
\Bnon-word boundary
\Dany non-digit
\wany alphanumeric/underscore
\Wa non-alphanumeric
\swhitespace(space,tab)
\Snon-whitespace
*zero or more occurrences of the previous char or expression
+one or more occurrences of the previous char or expression
?exactly zero or one occurrence of the previous char or expression
{n} occurrences of the previous char or expression
{n,m}from to occurrences of the previous char or expression
{n,}at least occurrences of the previous char or expression
{,m}up to occurrences of the previous char or expression
\*an asterisk
\.a period
\?a question mark
\na newline
\ta tab
[cite:;taken from @nlp_jurafsky_2020 chapter 2 regular expressions, text normalization, edit distance]