Here's a case that doesn't currently parse correctly:
/\[(?:a=(.*?))?(?:b=(.*?))?]/
The regex it generates internally is
/(\[)(?:(a=)(.*?)()?)(?:(b=)(.*?))?]/
Notice that the first optional capture group from the original has been converted into a non-optional capture group!
ie
| There should be a ? here before the )
(\[)(?:(a=)(.*?)()?)(?:(b=)(.*?))?]
|-| This optional capture group shouldn't exist?
(\[)(?:(a=)(.*?)()?)(?:(b=)(.*?))?]
Update: I tried to simplify the regex when i opened the issue but I realised that the simplification wasn't valid because I was using non-greedy capture groups without an end character in the regex
Here's a case that doesn't currently parse correctly:
/\[(?:a=(.*?))?(?:b=(.*?))?]/
The regex it generates internally is
/(\[)(?:(a=)(.*?)()?)(?:(b=)(.*?))?]/
Notice that the first optional capture group from the original has been converted into a non-optional capture group! ie
Update: I tried to simplify the regex when i opened the issue but I realised that the simplification wasn't valid because I was using non-greedy capture groups without an end character in the regex