Skip to content

Commit 5ec0731

Browse files
committed
Readme: Mention Oniguruma in flag n comparison
1 parent 33c0512 commit 5ec0731

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ regex`\b(ab|cd)\b`
470470
```
471471

472472
> [!NOTE]
473-
> Flag <kbd>n</kbd> is based on .NET, C++, PCRE, Perl, and XRegExp, which share the <kbd>n</kbd> flag letter but call it *explicit capture*, *no auto capture*, or *nosubs*. In Regex+, flag <kbd>n</kbd> also prevents using numbered backreferences to refer to named groups, which follows the behavior of C++. Referring to named groups by number is a footgun, and the way that named groups are numbered is inconsistent across regex flavors. Note that Ruby regexes, despite not having flag <kbd>n</kbd>, also prevent referring to named groups by number and make `(…)` noncapturing if named groups are present.
473+
> Flag <kbd>n</kbd> is based on .NET, C++, Oniguruma, PCRE, Perl, and XRegExp. It's not always specified by a flag, but where it can be (.NET, PCRE, Perl, XRegExp) it's always <kbd>n</kbd>. The option is variously called *explicit capture*, *no auto capture*, *don't capture group*, or *nosubs*. In Regex+, flag <kbd>n</kbd> also prevents using numbered backreferences to refer to named groups, which follows the behavior of C++ and the default handling of Oniguruma and Ruby. Referring to named groups by number is a footgun, and the way that named groups are numbered is inconsistent across regex flavors.
474474
475475
## 🧩 Interpolation
476476

0 commit comments

Comments
 (0)