Last active
November 19, 2016 15:33
-
-
Save brandedoutcast/1006932c2967c1474b4beb31c10587f6 to your computer and use it in GitHub Desktop.
General collection of Regular Expressions for reusability
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
Timestamp 12 & 24 hr format | |
(?:[0-1]?\d|2[0-3]):[0-5]?\d(?:pm|am)? | |
Timestamp 12 hr format | |
(?:0?\d|1[0-2]):[0-5]?\d\s?(?:pm|am) | |
Date format supporting yesterday, today & tomorrow along with delimeters -, / & space | |
(?:today|tomorrow|yesterday|(?:[0-2]?\d|3[0-1])(\s|-|\/)(?:0?\d|1[0-2])\1\d{4}) | |
Decimal number > 1 | |
\d*[1-9]+\d*(?:\.\d{1,2})? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment