Development Tools
Regex Tester for JavaScript
Type a pattern and some test text and see every match highlighted as you type, with its position, numbered and named capture groups, a replacement preview and a plain-English list of what each part of the pattern does. It uses your browser's own JavaScript regular expression engine, so results match what JavaScript code will do, but not necessarily other flavours such as PCRE, Python or .NET. Matching runs in a background worker with a time limit so a pattern that backtracks catastrophically cannot freeze the page.
How to use it
- Enter the pattern without the slashes and set the flags.
- Type or paste the text to test.
- Read the highlighted matches and groups, and try a replacement.
Example
The pattern (\d{4})-(\d{2})-(\d{2}) on “Released 2026-03-14” matches 2026-03-14 with groups 2026, 03 and 14. The replacement $3/$2/$1 gives 14/03/2026.
Regex for SEO work
Regular expressions are used in Google Search Console filters, analytics filters and redirect rules. Always test a pattern on real URLs first, and remember that each tool may use a different flavour. For Apache redirects, test the final rule with the redirect checker.
Questions
Which regex flavour does it use?
JavaScript (ECMAScript), the engine in your browser. Lookbehind, named groups and Unicode property escapes depend on your browser's version. Patterns written for PCRE, Python or .NET may behave differently.
What do the flags mean?
g finds all matches, i ignores case, m makes ^ and $ match at line breaks, s lets . match line breaks, u and v turn on Unicode modes, y is sticky and d records match indexes.
Why was my test stopped after 1.5 seconds?
Some patterns, such as nested quantifiers like (a+)+, can take exponential time on certain text. The tool stops them rather than freezing your browser. Simplify the pattern.
Why does the explanation seem incomplete?
It is a reading aid for common tokens, not a full parser. Unusual constructs are described as literal text.
Is my text uploaded?
No. Matching runs in your browser, in a worker created from the page itself.
Get practical SEO tips by email
Occasional emails with new guides and tools. Confirm by email first; unsubscribe in one click.