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
{{ message }}
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
Perl, Ruby and .NET all allow multiple named capturing groups to share the same name in the regular expression. As of 07.2018, current implementations of named capturing groups in browsers (I've checked it in Chrome 67 and FF 61) don't allow this. So this regular expression for strict date analyze is invalid:
var dateRegExp = /^(?:(?<month>0?2)\/(?<day>[12][0-9]|0?[1-9])|(?<month>0?[469]|11)\/(?<day>30|[12][0-9]|0?[1-9])|(?<month>0?[13578]|1[02])\/(?<day>3[01]|[12][0-9]|0?[1-9]))\/(?<year>(?:[0-9]{2})?[0-9]{2})$/
Do you consider to add support for multiple named capturing groups?
I think it may help a lot. If we started to implement it as it in the other languages why don't implement it
thoroughly with all the features available?