Closed matthew-dean closed 1 year ago
I have a pattern like:
{{ident}}?{{interpolated}}(?:{{interpolated}}|{{ident}})+
Then I'm building with XRegExp.build
I do not want nor need named capture groups, but the XRegExp docs say
Allows ({{name}}) as shorthand for (?{{name}})
...and there seems no way to disable this conversion. This results in a SyntaxError: Cannot use same name for multiple groups (?<ident>
Cannot use same name for multiple groups (?<ident>
Is there any workaround?
Oh, hmm, I see, my interpolated fragment referenced {{ident}} as ({{ident}})
interpolated
{{ident}}
({{ident}})
I have a pattern like:
Then I'm building with XRegExp.build
I do not want nor need named capture groups, but the XRegExp docs say
...and there seems no way to disable this conversion. This results in a SyntaxError:
Cannot use same name for multiple groups (?<ident>
Is there any workaround?