Regex Tester
Try a pattern, flags, and sample input to see matches before you commit the expression to application code.
Patterns and sample text are not uploaded.
Test JavaScript regular expressions
Enter a pattern without surrounding slashes, add flags such as g, i, or m, and paste sample text. Matches use the browser RegExp engine. Invalid syntax is reported locally. Use the JSON Validator when you need to check JSON rather than a regex.
How to test a regular expression
- Enter a pattern without surrounding slashes.
- Add flags such as g, i, or m.
- Paste sample text and select Test.
Regex Tester FAQ
Which regex engine is this?
The JavaScript RegExp engine in your browser.
Why did my pattern fail?
Invalid syntax throws a local error. Balanced groups and correct flags usually fix it.
Related tools
- JSON Validator — Check JSON syntax without leaving the page.
- SQL Formatter — Indent SQL keywords for easier review.
Guides: developer guides, service enquiry.