Regex Tester
Test JavaScript regular expressions live: highlighted matches, capture groups, named groups and replace preview.
Runs locally in your browser
//gi
MatchesNo matches
Contact us at hello@no.tools or support@example.com.
Invalid: foo@bar, @example.com
Quick reference
- .
- Any character except line breaks
- \d
- Digit
- \w
- Word character
- \s
- Whitespace
- \D
- Not a digit
- \b
- Word boundary
- ^
- Start of string or line
- $
- End of string or line
- [abc]
- One of a, b or c
- [^abc]
- Not a, b or c
- [a-z]
- Character range
- (…)
- Capture group
- (?<name>…)
- Named capture group
- (?:…)
- Non-capturing group
- a|b
- a or b
- *
- Zero or more
- +
- One or more
- ?
- Zero or one
- {n}
- Exactly n times
- {n,m}
- Between n and m times
- *? +?
- Lazy (as few as possible)
- (?=…)
- Followed by
- (?<=…)
- Preceded by
- \1
- Back-reference to group 1