Test JavaScript regular expressions against sample text and inspect the matches.
Regex
Test String
ABC 100 abc 200 ABC 300
Matches
ABC
abc
ABC
About Regex Test
Regex Test lets you write a JavaScript regular expression, set flags, and test it against a block of sample text — all in the browser with results updated as you type. Matches are highlighted inline so you can see exactly what the pattern captures. Use it to iterate on a regex before adding it to code, verify that capture groups extract the right substrings, and share working patterns with teammates via the URL.
Common uses
- Test a regular expression against live sample text and see all matches highlighted in real time.
- Iterate on pattern syntax and flags quickly without rerunning a script after each change.
- Verify that capture groups return exactly the substrings your code depends on.
- Share a link to a working pattern with a colleague instead of describing it in prose.
Related tools
FAQ
Which regex flavour does this tool use?
The tool uses JavaScript's built-in RegExp engine, which is the ECMA-262 standard. It supports flags g (global), i (case-insensitive), m (multiline), s (dotAll), and u (Unicode). Lookaheads, lookbehinds, named capture groups, and most modern regex features are supported in all current browsers.
How do I use capture groups?
Wrap part of your pattern in parentheses: (\w+). The tool will show each matched group alongside the full match. Named groups use the syntax (?<name>\w+) and are displayed with their name in the results.
What is the difference between the g and m flags?
The g (global) flag makes the engine find all matches rather than stopping after the first. The m (multiline) flag changes the behaviour of ^ and $ so they match the start and end of each line rather than the start and end of the whole string.
Is Regex Test free to use?
Yes — Regex Test is completely free and requires no sign-up or account. There are no usage limits for standard developer tool tasks.
Does Regex Test send my data to a server?
No. Regex Test runs entirely in your browser using JavaScript. Text you paste and files you upload never leave your machine, so it is safe to use with sensitive payloads, API tokens, and internal configuration data.