Regex tester
Test a JavaScript regular expression live: highlighted matches, capture groups and g, i, m, s, u flags. Free, no sign-up.
- Free
- No sign-up
- No file uploaded
- Windows, Mac, Android, iPhone
Loading the tool…
About this tool
Write a regular expression and instantly see what it finds in your text: highlighted matches, index, numbered and named groups. The engine is JavaScript's, the same as Node.js and browsers.
How to use
- Write the expression, without slashes.
- Tick the flags you need.
- Paste the test string and read the matches.
Common problems and fixes
Only one match instead of all
Add the g flag in your code; this tool always enables it to list every match.
The dot does not cross lines
Tick the s flag (dotAll) or use [\s\S].
The page slows down on some expressions
Nested quantifiers like (a+)+ cause “catastrophic backtracking”: simplify the expression.
Frequently asked questions
Which syntax is used?
JavaScript's (ECMAScript), close to PCRE: lookbehind, named groups (?<name>…) and Unicode are supported.
How do I escape a special character?
Prefix it with a backslash: \. for a dot, \( for a parenthesis.
Is my text uploaded?
No, the expression runs in your browser.
What does the m flag do?
With m, ^ and $ match the start and end of each line, not of the whole text.
Related searches
Still stuck?
Ask on the forum: the category, the tool, your device sheet and the test result will be filled in for you.