Regex tester
Test JavaScript regular expressions with match and group highlighting.
//g
No matches
Write to qa@example.com or dev.team@test.kz
Cheat sheet
- .
- any character
- \d
- digit
- \w
- letter, digit or _
- \s
- whitespace
- [abc]
- one of
- [^abc]
- any except
- ^ $
- start and end of line
- *
- 0 or more
- +
- 1 or more
- ?
- 0 or 1
- {2,5}
- 2 to 5 times
- (…)
- group
- (?<name>…)
- named group
- a|b
- a or b
- \b
- word boundary
- (?=…)
- lookahead
Everything runs in your browser: your input and files are never uploaded.
How to use
- Enter the regular expression without slashes and choose flags.
- Paste the test text — matches are highlighted instantly.
- See the groups of every match and the replace result below.
FAQ
Which syntax is supported?
JavaScript (ECMAScript) syntax, including named groups (?<name>…), lookbehind and Unicode property escapes with the u flag.
Why is only one match found?
Enable the g (global) flag to find all matches.
How do I reference a group in a replacement?
Use $1, $2 for numbered groups and $<name> for named groups.