Created
April 30, 2013 02:21
-
-
Save linkarys/5486253 to your computer and use it in GitHub Desktop.
regular expressions: summary
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
regex{ | |
negated character class:{ | |
[^...] | |
} | |
word bundary:{ | |
\b | |
\< | |
\> | |
} | |
wrod: { | |
python: (?<!\w)(?=\w)...(?<=\w)(?!\w) | |
gun: \<...\> | |
} | |
modifier:{ | |
i: ignore | |
g: global | |
} | |
number:{ | |
floating-point numbers: ^[-+]?[0-9]+(\.[0-9]+)?$ | |
float: ^[-+]?(\d+|\d+\.\d*|\d*\.\d+)$ | |
} | |
string:{ | |
any: .* | |
any without space: (\S*) | |
content in parenthesis: \([^()]*\) | |
tag: <[^>+]> | |
} | |
hour:{ | |
12: (1[0-2]|[0-9]):[0-5][0-9] *(am|pm) | |
24: ([01]?[0-9]|2[0-3]):[0-5][0-9] | |
} | |
modifier: { | |
(?i) <--------------> (?-i) not js | |
} | |
matchs: { | |
quote: { | |
com: "([^"\\]+|\\.)*+" | |
js: (?:[^\\])"(?:[^"]|(?:[^\\])")*" | |
} | |
} | |
} | |
07/04/76 | |
07-04-76 | |
07.04.76 | |
9:17 am | |
18:24 | |
12:30 pm | |
99:99 pm | |
bac artf.asdf qwee | |
"asdfasdf\"aawerasdf" | |
"/ | - \\" or "[^-^]" | |
"asdfasdf\"aawerasdf"asdfasdf\"asdfasdf" | |
"you need a 2\" | |
"" | |
"very" "long" | |
56.4 | |
4 | |
0.5 | |
123123.312312 | |
a12312.123a | |
From | |
aSubject | |
Date:s | |
the the the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment