Engine: JavaScript RegExp (ECMAScript flavor)
Matches are computed by your browser's native RegExp engine, run in a Web Worker. It is the same flavor you use in JS code — but it differs from PCRE (PHP, Perl, Python re):
- No recursion
(?R), atomic groups(?>…)or conditionals(?(1)…). - Named groups are written as
(?<name>…)and backreferences as\k<name>(not(?P<name>)). - Anchors
\A \Z \zdo not exist — use^ $(per line with themflag). - The
dflag (hasIndices) adds group positions;uenables full Unicode mode and\u{…}.
Syntax cheat sheet
Anchors
- ^
- start of input / line (m)
- $
- end of input / line (m)
- \b
- word boundary
- \B
- non-word-boundary
Character classes
- .
- any character (no \n)
- \d \D
- digit / non-digit
- \w \W
- word / non-word char
- \s \S
- whitespace / non-ws
- [a-z]
- range; [^…] negation
Quantifiers
- *
- 0 or more
- +
- 1 or more
- ?
- 0 or 1 (optional)
- {n,m}
- from n to m times
- *?
- lazy (as few as possible)
Groups
- (…)
- capturing group
- (?:…)
- non-capturing
- (?<n>…)
- named
- \1 \k<n>
- backreference
- a|b
- alternation
Lookaround
- (?=…)
- positive lookahead
- (?!…)
- negative lookahead
- (?<=…)
- positive lookbehind
- (?<!…)
- negative lookbehind
Flags
- g
- all matches
- i
- ignore case
- m
- ^ $ per line
- s
- . matches newline
- u y d
- unicode / sticky / indices