Javascript Regex Testing

Use this tool to test regular expressions in javascript. Matches will be displayed below, groups to the right. Note this tool only displays the first match found.

Basics
. Any non-newline char
\s Any whitespace char
\d Any digit
^ Start of line
$ End of line
\ Character Escape
More
\n Newline
\t Tab
[abc] Any single char: a, b, or c
[^abc] Any char except: a, b, or c
[a-z] Any char a to z
[a-zA-Z] Any char a to z OR A to Z
Quantifiers
* 0 or more
+ 1 or more
? 0 or 1
{2} Exactly 2
{3, 6} Between 3 and 6
{4,} 4 or more
Groups
(...) Capturing Group
(?:...)t Non-capturing group
(a|b) Match a or b
(...)? Optional match group
(\d\d) Match any two digits
(joe) Match word 'joe'

Groups