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
I would suggest to use String.prototype.matchAll(), which provides multiple matching at the same time.
The results of the second and subsequent matches will look like match2, match3, ..., match9, and each group will be prepared in the form of match2-group1, ..., match2-group9.
Why this is needed
As already mentioned in #230, we cannot access to the value that matches the regex in the second or later positions.
This is due to the fact that RegExp.prototype.exec() captures patterns one by one.
This causes some problem where we want to list multiple patterns in GitHub Issue titles.
The text was updated successfully, but these errors were encountered:
What you want to add
I would suggest to use
String.prototype.matchAll()
, which provides multiple matching at the same time.The results of the second and subsequent matches will look like
match2
,match3
, ...,match9
, and each group will be prepared in the form ofmatch2-group1
, ...,match2-group9
.Why this is needed
As already mentioned in #230, we cannot access to the value that matches the regex in the second or later positions.
This is due to the fact that
RegExp.prototype.exec()
captures patterns one by one.This causes some problem where we want to list multiple patterns in GitHub Issue titles.
The text was updated successfully, but these errors were encountered: