Last active
March 7, 2021 07:01
-
-
Save marcelotmelo/b67f58a08bee6c2468f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jy95 ! Your shortened regex is not correct. It's missing "T" or "t" between date and time representation.
This is the corresponding part of grammar that says it:
date-time = full-date "T" full-time
https://www.ietf.org/rfc/rfc3339.txt