Using regexes for extracting data from web pages? Check out ParseHub, a visual web scraping tool built by the team behind Debuggex.
http://stackoverflow.com/a/27952402/1810429 No description Embed on StackOverflow
^\d4 times\d\dA-ZOne of.\dup to 2A-ZOne ofGroup 5Group 4\dA-ZOne ofA-ZOne of.\dA-ZOne of\dA-ZOne of.\dGroup 6Group 3A-ZOne of.\dGroup 2A-ZOne of3 times-\d4..6Group 1$
View Cheatsheet
Visual Mode
Text Mode
 
1
^(\d{4}(\d([\dA-Z]|(\.(\d{1,2}|[A-Z]))|\d[A-Z]|[A-Z](\.\d[A-Z]?|[\dA-Z]\.\d))?|[A-Z]\.\d)|[A-Z]{3}-\d{4,6})$
X
Result: Matches Does not match starting at the black triangle slider
1
X
Unit Tests (showhide) Help You haven't added any unit tests yet 15 Total Tests: Passing (15); Failing (0)
No unit tests added.
Expected Matches (hover over highlights for details) Actual Matches  Edit   Passing 
12345
X
12345
X
12345.6
X
12345.6
X
12345.67
X
12345.67
X
12345.A
X
12345.A
X
123456
X
123456
X
123456A
X
123456A
X
12345A
X
12345A
X
12345A.6
X
12345A.6
X
12345A.6B
X
12345A.6B
X
12345A6.7
X
12345A6.7
X
12345AB.6
X
12345AB.6
X
1234A.5
X
1234A.5
X
ABC-1234
X
ABC-1234
X
ABC-12345
X
ABC-12345
X
ABC-123456
X
ABC-123456
X
Show cheatsheet
JavaScript regex quick reference (hide):
[abx-z] One character of: a, b, or the range x-z
[^abx-z] One character except: a, b, or the range x-z
a|b a or b
a? Zero or one a's (greedy)
a?? Zero or one a's (lazy)
a* Zero or more a's (greedy)
a*? Zero or more a's (lazy)
a+ One or more a's (greedy)
a+? One or more a's (lazy)
a{4} Exactly 4 a's
a{4,8} Between (inclusive) 4 and 8 a's
a{9,} 9 or more a's
(?>...) An atomic group
(?=...) A positive lookahead
(?!...) A negative lookahead
(?<=...) A positive lookbehind
(?<!...) A negative lookbehind
(?:...) A non-capturing group
(...) A capturing group
(?P<n>...) A capturing group named n
^ Beginning of the string
$ End of the string
\d A digit (same as [0-9])
\D A non-digit (same as [^0-9])
\w A word character (same as [_a-zA-Z0-9])
\W A non-word character (same as [^_a-zA-Z0-9])
\s A whitespace character
\S A non-whitespace character
\b A word boundary
\B A non-word boundary
\n A newline
\t A tab
\cY The control character with the hex code Y
\xYY The character with the hex code YY
\uYYYY The character with the hex code YYYY
. Any character
\Y The Y'th captured group
(?1) Recurse into numbered group 1
(?&x) Recurse into named group x
(?P=n) The captured group named 'n'
(?#...) A comment

Full JavaScript regex cheatsheet