Rewrites every capturing group in a regex source as a non-capturing group.
Escapes (\(), character classes ([...]) and lookaround assertions ((?=, (?!, (?<=, (?<!) are preserved untouched.
\(
[...]
(?=
(?!
(?<=
(?<!
The regex source to transform.
The source with all capturing groups made non-capturing.
Rewrites every capturing group in a regex source as a non-capturing group.
Escapes (
\(), character classes ([...]) and lookaround assertions ((?=,(?!,(?<=,(?<!) are preserved untouched.