regex
The regex module provides compiled regular expression matching using
RE2-compatible syntax.
Usage
Types
- Regex - A compiled regular expression
Syntax
Patterns use RE2 syntax, the same as the Rust
regex crate. This supports
most common regular expression features including:
- Character classes:
\d,\w,\s,[a-z],[^abc] - Repetition:
*,+,?,{n},{n,m} - Anchors:
^,$,\b - Groups:
(abc),(?:abc)(non-capturing),(?<name>abc)(named) - Alternation:
a|b
Backreferences and lookahead/lookbehind assertions are not supported.