Created
March 4, 2019 06:54
-
-
Save wpik/65fb959b052c39b88d552247735f4f9b to your computer and use it in GitHub Desktop.
RFC3339 timestamp regex
This file contains hidden or 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
| private static final Pattern RFC3339_TIMESTAMP_PATTERN = Pattern.compile( | |
| "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(?:T|t)" + | |
| "([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?" + | |
| "(?:Z|z|(\\+|-)([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