Regex tester
| # | Match | Groups | Named groups |
|---|
About this tool
A regex tester lets you write a pattern and check it against real text right away. Type a pattern, set flags like g, i, or m, and paste in a test string: the tool highlights every match, lists each one with its numbered and named capture groups, and lets you try a replacement string before you commit to it in code.
Everything runs in your browser using JavaScript’s built-in RegExp engine. Your pattern and test string never leave your machine, so it’s fine to test a regex against a log line with a customer’s email in it, a config file, or any other data you’d rather not paste into a third-party site.
Use it to validate input formats like phone numbers or postal codes, pull structured data out of log lines, or check that a replacement pattern with $1 or $<name> produces the output you expect before you drop it into your codebase. See MDN’s guide to regular expressions for the full syntax.