This regex tester lets you build and debug JavaScript regular expressions live, with every match highlighted in your sample text the moment you type. As an online regex tester it shows capture groups, named groups and the start index of each match, so you can see precisely what a pattern catches. Toggle the i, m, s and u flags to test regular expressions under different conditions without rewriting them; matching is always global, so every match is listed. It uses the same RegExp engine your browser ships with, so results match what your JavaScript code will actually do at runtime. Useful for developers writing validation, QA engineers checking parsing rules, and anyone learning regexp. Everything runs locally in your browser, so your patterns and test data never leave your device.
Features
Highlights every match in your test string live as you type the pattern
Shows numbered capture groups and named groups for each match
Reports the start index of every match, numbered in order
Toggle the i, m, s and u flags individually; matching is always global
Uses the native browser JavaScript RegExp engine for accurate results
Surfaces pattern syntax errors so you can fix invalid expressions fast
Processes patterns and test text entirely in your browser
How to use the Regex Tester
Type or paste your regular expression into the pattern field.
Toggle the flags you need (i, m, s, u) next to the pattern.
Paste your sample text into the test string box.
Read the highlighted matches, capture groups and positions in the results panel.
Example
Input
Pattern: (\w+)@(\w+)\.com Flags: g
Text: contact alice@example.com or bob@test.com
Output
Match 1: alice@example.com group1=alice group2=example
Match 2: bob@test.com group1=bob group2=test
Two matches with capture groups extracted from each email.
Common errors & troubleshooting
Turning the g flag off still lists every match. — The tester always searches globally so you can see every match. In your own code a regex without g stops at the first match with exec() or match(), so add g there when you need them all.
Case-sensitive pattern misses words like 'Error' vs 'error'. — Turn on the i (ignore case) flag so the pattern matches regardless of letter case.
A dot (.) is not matching newline characters in multiline text. — Enable the s (dotall) flag so . also matches line breaks.
^ and $ only anchor to the whole string, not each line. — Enable the m (multiline) flag to anchor at the start and end of every line.
Named groups or Unicode property escapes (\p{...}) throw an error. — Enable the u (unicode) flag, which is required for \p{...} escapes and strict Unicode handling.
The pattern field shows a syntax error. — Check for unbalanced brackets or parentheses and escape literal special characters like . or ( with a backslash.
Frequently asked questions
What is a regex tester?
A regex tester runs a regular expression against sample text and shows you what it matches in real time. ArrayKit's Regex Tester highlights every match, lists capture groups and reports each match position so you can debug patterns visually.
Which regex flavour does the Regex Tester use?
JavaScript — it uses the same RegExp engine your browser runs, so matches reflect exactly how your JS code will behave.
How do I test capture groups in the Regex Tester?
Wrap parts of your pattern in parentheses and run it against your text. Each match lists its numbered capture groups and any named groups, along with the index where the match starts.
Which flags can I toggle in the Regex Tester?
You can switch i (ignore case), m (multiline), s (dotall) and u (unicode) on or off independently to test regular expressions under different conditions. There is a g (global) button too, but matching is always global, so every match is listed either way.
Can the Regex Tester handle multiline text?
Yes. Paste multiline input and enable the m flag to anchor ^ and $ per line, or the s flag so . spans line breaks.
Are my patterns and test data sent anywhere?
No. The Regex Tester evaluates everything locally in your browser, so your patterns and sample text never leave your device and nothing is uploaded to a server.
Related tools
Text Diff — Compare two texts line-by-line and see additions and removals.
JSON Formatter — Beautify, minify and validate JSON with error locations.
Case Converter — Convert text between camelCase, snake_case, kebab-case, PascalCase and more.
URL Parser — Break a URL into its parts and list query parameters.