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
This regex above is supposed to match ISO-8601 dates and I suppose that it's better at identifying date strings than the original code. I was prompted to add this better-date-matching since the current code mis-identified a "HK phone number with center-blank-separator" (1234 5678) as dates and it bugged me.
If the author don't mind, please add this to your fantastic work. If no one issue any pull request, at least users of this piece of code can add the regex themselves.
Thanks.
The text was updated successfully, but these errors were encountered:
http://rgxdb.com/r/526K7G5W
/^(?:[+-]?\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?:T\s?(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[zZ]|(?:[+-])(?:[01]\d|2[0-3]):?(?:[0-5]\d)?)?)?)?$/
This regex above is supposed to match ISO-8601 dates and I suppose that it's better at identifying date strings than the original code. I was prompted to add this better-date-matching since the current code mis-identified a "HK phone number with center-blank-separator" (1234 5678) as dates and it bugged me.
If the author don't mind, please add this to your fantastic work. If no one issue any pull request, at least users of this piece of code can add the regex themselves.
Thanks.
The text was updated successfully, but these errors were encountered: