Syntax in each engine

Which syntax each engine has, a row a feature. Every cell is checked by running a pattern in that engine itself, Dotstar’s own copy of it, so the table says what the engines do, not what anyone remembers.

✓ has it · — refuses the pattern · ≠ takes it, but it means something else there (often a plain character)

FeatureJavaScriptPCRE2PerlPythonJava.NETRubyICUSwiftGoRE2RustPOSIX EREC++ ECMAScriptVBScript*
Non-capturing group (?:…)✓✓✓✓✓✓✓✓✓✓✓✓—✓✓
Lazy quantifiers *? +? ??✓✓✓✓✓✓✓✓✓✓✓✓≠✓✓
Possessive quantifiers *+ ++ ?+—✓✓✓✓—✓✓✓——≠≠——
Atomic group (?>…)—✓✓✓✓✓✓✓✓——————
Up to n times, without a minimum {,n}≠✓✓✓—≠✓—✓≠≠———≠
Named group (?<name>…)✓✓✓—✓✓✓✓✓✓✓✓———
Named group, Python’s spelling (?P<name>…)—✓✓✓————✓✓✓✓———
Backreference \1✓✓✓✓✓✓✓✓✓———≠✓✓
Named backreference \k<name>✓✓✓—✓✓✓✓✓——————
Lookahead (?=…) (?!…)✓✓✓✓✓✓✓✓✓————✓✓
Lookbehind (?<=…) (?<!…)✓✓✓✓✓✓✓✓———————
Lookbehind of bounded length (?<=a{1,3})✓✓✓—✓✓—✓———————
Lookbehind of any length (?<=a+)✓———✓✓—————————
Start of the text \A≠✓✓✓✓✓✓✓✓✓✓✓≠—≠
End of the text \z≠✓✓✓✓✓✓✓✓✓✓✓≠—≠
Word boundary \b✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓
Flags in the pattern (?i)—✓✓✓✓✓✓✓✓✓✓✓———
Flags for part of it (?i:…)✓✓✓✓✓✓✓✓✓✓✓✓———
Comment (?#…)—✓✓✓—✓✓✓✓——————
Character by its code \x{e9}≠✓✓—✓——✓✓✓✓✓✓—≠
Character by its code, JavaScript’s way \u00e9✓—≠✓✓✓✓✓✓——✓≠≠✓
Unicode property \p{L}✓✓✓—✓✓✓✓✓✓✓✓——≠
\w takes letters past ASCII \w≠≠✓✓≠✓≠✓✓≠≠✓✓≠≠
\d takes other scripts’ digits \d≠≠✓✓≠✓≠✓✓≠≠✓≠≠≠
POSIX class in brackets [[:alpha:]]≠✓✓≠≠≠✓✓✓✓✓✓✓✓≠
Keep what came before out of the match \K≠✓✓———✓≠————≠—≠
Recursion (?R)—✓✓————————≠———
Conditional (?(1)…|…)—✓✓✓—✓✓————————

Vim, Emacs, Lua and POSIX’s basic dialect spell most of these otherwise (Vim’s lookahead is \@=, Lua has %b() for balanced pairs), so they’re not in the table: the app’s Help says what each has. For what the differences mean, see Learn regular expressions.