Regular Expressions by Everett Benzel
Some patterns to consider...
Alternates
- ab|d - or
- [abe] - one of
- [^abe] - anything but
- [a-c] - range
Anchors
- ^a - start of string
- $a - end of string
Lookarounds
- a(?=c) - followed by
- a(?!c) - not followed by
- (?<=b)c - preceded by
- (?< !b)c - not preceded by
Quantifiers
- a? - zero or one a
- a* - zero or more a
- a+ - one or more a
- a{n} - exactly n a
- a{n,} - n or more a