Regex Tester
Test a JavaScript regular expression against sample text without crashing on bad patterns.
Your input stays in your browser. Nothing is uploaded.
- 2 matches
- Hello @0
- 123 @6
About this tool
The pattern is compiled with the JavaScript RegExp engine. Invalid syntax is caught and shown. Matching stays in the browser.
How it works
Enter a pattern, optional flags, and a test string. Matches list the text and index. A bad pattern never reloads the page.
new RegExp(pattern, flags)
Examples
Words
\w+ against “Hello 123” yields Hello and 123.
FAQ
Which flavor?
JavaScript (ECMAScript) regular expressions, including Unicode when you add the u flag.
Can a regex freeze the tab?
Pathological patterns can still be slow. Keep tests small.

