How to use it
Type a pattern in the top box (the slashes and flags are handled for you), paste your text into the test string, and matches highlight as you type. The flags switch on options: g finds every match, i ignores case, m makes ^ and $ match line starts and ends, s lets . match newlines, and u turns on full Unicode. Toggle the checkboxes or type flags directly.
Why run it in your browser
Regex work usually means pointing a pattern at real material — a production log, an export, a list of emails or IDs. Many online testers send that text to a server to run the match. This one uses your browser's own regular-expression engine, so the data never leaves the page. It's the JavaScript flavour of regex, the same one that runs in Node and every browser.
Capture groups and replace
Parentheses create capture groups. If your pattern is (\w+)@(\w+), the tester lists what group 1 and group 2 caught for each match. In the replace box you can reference them with $1, $2, and so on — so $2 <$1> would rewrite name@host as host <name>. The result appears below without changing your original text.
A few patterns to start from
\d+— one or more digits.\b\w+@\w+\.\w+\b— a simple email shape.^\s*$withm— blank lines.#([0-9a-fA-F]{6})\b— a six-digit hex colour.
Frequently asked questions
Which regex flavour is this?
JavaScript (ECMAScript). It covers the common syntax — character classes, quantifiers, groups, lookahead, and with the u flag, Unicode property escapes. A pattern written for PCRE or Python may need small adjustments.
My pattern is valid but matches nothing — why?
Check the flags first: without g only the first match is found, and case-sensitivity trips up a lot of patterns — try i. If you expect a dot to cross line breaks, add s.
Is anything stored or sent?
No. The pattern and text stay in your browser tab. Nothing is uploaded, logged, or saved when you leave.
Tools that pair with this one
- JSON Formatter — pretty-print a payload before writing a pattern against it.
- Case Converter — normalise case so your pattern doesn't have to.
Everything runs locally in your browser. This uses the JavaScript regex engine; behaviour can differ slightly from other languages.