You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
should evaluate to the regex: /(?:((?:abc)|(?:(?:def))))/, but instead it evaluates to: /(?:((?:abc))|(?:(?:def)))/. As a result, if we test this expression against the string "def" it produces a match but no group is captured. This happens because the implementation of or() closes any opening parenthesis it finds in the string that precedes it.
I don't know why or() was implemented this way, but I believe the implementation of oneOf() I propose in #31 may fix this problem.
The text was updated successfully, but these errors were encountered:
It seems to me that the following expression:
should evaluate to the regex:
/(?:((?:abc)|(?:(?:def))))/
, but instead it evaluates to:/(?:((?:abc))|(?:(?:def)))/
. As a result, if we test this expression against the string "def" it produces a match but no group is captured. This happens because the implementation of or() closes any opening parenthesis it finds in the string that precedes it.I don't know why or() was implemented this way, but I believe the implementation of oneOf() I propose in #31 may fix this problem.
The text was updated successfully, but these errors were encountered: