Syntaxes
Regular expressions syntaxes are not equivalent across different implementations. New syntaxes can even come along and our study of regular expression here does not need to be polluted by these matters. Therefore, we have arbitrary chosen from popular implementation the syntax used to illustrate our examples.
That said, many remarks are included about less commons features and particularities of some well known implementation.
- Literals
- Meta-character used to match special characters
- Any character and character classes
- Any character
- Character classes
- Negated character classes
- Unicode properties
- Predefined classes
- Quantifiers
- Greedy quantifiers
- Non-greedy or lazy quantifiers
- Possessive quantifiers
- Anchors and positional assertions
- Start/end of line/string
- Word boundaries
- Lookarounds
- End of a previous match
- Alternation, Grouping, capturing and back-references
- Alternation
- Grouping
- Capturing
- Back-references
- Atomic grouping
Depending on the implementation, some features may be missing. Note also that Perl and .NET provide specific solutions for matching nested constructs. We do not illustrate them here.