Patterns are evaluated with the native JavaScript regex engine, in your browser. Capture groups are listed under each match; the bar above shows where matches fall across the test string.
How to test a regular expression
Type your pattern between the slashes and toggle the flags you need. Enter or paste a test string below; matches are highlighted in place, listed individually with their position and capture groups, and plotted on a map so you can see where they fall. Everything updates as you type, so you can refine a tricky pattern in seconds.
From validation to extraction
Regular expressions are the Swiss-army knife of text: validating form fields, parsing log lines, scraping identifiers, and powering find-and-replace. They are also easy to get subtly wrong, which is why an interactive tester with live highlighting and group inspection saves so much time over guessing in code.
🔐 Local only: your pattern and data stay in the browser. For software, automation and integration work, Servnet is a UK IT partner since 2001.
Regex — common questions
Which regex flavour does this use?
It uses the JavaScript (ECMAScript) regular-expression engine built into your browser — the same one your front-end code runs. Supported flags are g (global), i (ignore case), m (multiline), s (dotall) and u (unicode).
How do I see capture groups?
Each match in the list shows its captured groups numbered 1, 2, 3… Add parentheses ( ) to your pattern to create groups; an empty group is shown as ∅. This is ideal for extracting parts of a string, like the domain from an email.
What do the flags do?
g finds all matches rather than just the first; i makes the pattern case-insensitive; m makes ^ and $ match at line breaks; s lets . match newlines; u enables full Unicode handling. Toggle them and watch the matches update live.
Why is the match count capped?
To keep the page responsive, matching stops after a safety limit (shown with a “+”). Patterns that can match an empty string (like a*) are advanced automatically so they cannot loop forever.
What can I use regex for?
Validating input (emails, postcodes, IDs), searching and extracting data from logs, find-and-replace across code, and parsing structured text. Testing interactively here is far faster than trial-and-error in code.
Is my test data private?
Yes. The pattern and test string never leave your browser — matching runs locally in JavaScript.