Regular Expression Patterns (RegEx)
David Ruel (Unlicensed)
Must
- Patterns must always specify the expected length using {}
May
- Patterns may include anchors:
^
and $
- Patterns may use ranges such as:
[0-9]
, [a-z]
, or [A-Z]
- Patterns may use partial ranges such as:
[B-F]
- Patterns may use or such as:
[ABCDE]{1}
, or (A|B|C|D|E){1}
- Patterns may use dot as a wildcard:
(.){1}
- Patterns may use zero or one:
A?B?
- Patterns may use not:
[^ABCD]
- Patterns may use length operators:
{1}
or {1,}
or {1,2}
Must Not
- Patterns cannot include
.*
- Patterns cannot include
.+
- Patterns cannot span whitespace.
- Token must have more than 3 characters to match.
- Token must 30 characters or less.
- Patterns cannot use class descriptors such as:
[:digits:]
- Back references are not supported:
(A)\1
{"serverDuration": 43, "requestCorrelationId": "044ac46b50784445bcaabd2a1bc786b0"}