Text & developer tools
JavaScript Regex Tester Online
Explore a pattern against sample text in an isolated worker.
Data is processed on your device · No data is uploaded to our servers
Instructions
- Enter a pattern without slash delimiters, flags and test text, then test.
- Review the output and status message. Use the download button to save a copy.
Understanding your result
A pattern such as cat with the g flag finds every matching cat in your test text. Match positions and capture groups explain what the pattern selected. This uses JavaScript regex rules, which may differ from another application's search syntax.
What to do if you have a problem
If the pattern fails, omit enclosing slash delimiters and inspect the Flags field for unsupported or repeated letters. If it times out, simplify the pattern and test a shorter sample. Use Load example for a working starting point, then add one change at a time.
What to know before using the result
Maximum 100,000 test characters, 2,000 pattern characters and 1,000 matches. Worker is terminated after one second. JavaScript regex syntax applies; lookbehind and Unicode support depend on your browser.
Files and text are held in this page while you work. Downloads are saved through your browser. Reloading or closing the tab clears the working page; a downloaded copy remains in your device's download location.
Summary
Use match positions and groups to refine your JavaScript pattern against representative test text.