Regex Tester
A regular expression can match text by structure rather than by an exact phrase. Enter a JavaScript pattern, select its flags and test it against representative text before using it in production.
Match details
The result highlights each match and reports its starting index. Capturing groups appear beneath the corresponding match.
JavaScript regex flavour
This tester uses the browser’s ECMAScript regular-expression engine. A pattern written for PHP, Python, Java, .NET, RE2 or another engine may use different syntax or behave differently.
Google products do not all use the same regex engine. Google Search Console uses RE2 syntax for regex filters, while browser JavaScript uses ECMAScript. Test a production pattern in the platform that will execute it.
Execution limit
Some expressions can take excessive time on carefully structured text. The tester runs the expression inside a temporary Web Worker and ends the worker after 750 milliseconds. It also stops displaying results after 500 matches.
The timeout reduces the chance of a frozen page, but it does not prove that a pattern is safe for every input. Keep expressions specific, limit input length and test worst-case strings in the production environment.
Privacy
The pattern and test text remain in your browser. The plugin makes no AJAX request and sends no test data to another service.
Frequently Asked Questions
Which regex flavour does this tester use?
It uses the JavaScript RegExp implementation available in the visitor’s browser. ECMAScript support can vary slightly with browser age, particularly for newer features such as lookbehind and Unicode character properties.
Can I test a Google Search Console regex here?
You can use the tool for basic patterns, but Search Console uses RE2 rather than JavaScript regex. RE2 excludes some constructs supported by JavaScript, so confirm the final pattern against Search Console’s documented syntax and sample data.
What does the global flag do?
The g flag asks the engine to continue after the first match and return all matches up to the tool’s display limit. Without it, the result contains only the first match even when later text also fits the pattern.
What do the multiline and dotAll flags change?
The m flag changes how ^ and $ treat line boundaries. The s flag allows a dot to match newline characters, which it normally excludes, so these flags solve different problems.
Why did the tester stop the expression?
The worker exceeded the 750 millisecond safety limit, or the browser could not execute the pattern. A timeout can indicate catastrophic backtracking, excessive input or a pattern that needs tighter boundaries and simpler alternatives.
Does a successful test prove that the regex is safe?
No. Performance depends on the input, and a short friendly example may not expose a costly failure case. Test long non-matching strings and enforce limits wherever untrusted users can supply text.
Are my pattern and test text stored?
No. The browser creates a temporary worker, returns the match data and terminates it. The WordPress server and third-party services do not receive the submitted content.
Why can the same pattern behave differently elsewhere?
Regex engines implement different features, Unicode rules and matching guarantees. Always validate the final expression in the application, analytics platform or programming language where it will run.
