Regex Tester

Write a regular expression and see every match highlighted in your test text as you type. Inspect capture groups, try different flags and preview replacements, with common patterns ready to start from.

  • 100% free
  • No sign-up
  • Runs in your browser
Flags
Common patterns:
Matches highlighted
Match details
How to use

How to use the Regex Tester

  1. Type your pattern, or start from a common pattern.
  2. Choose flags such as g (global) and i (ignore case).
  3. Paste test text and watch matches highlight.
  4. Check groups and try a replacement string.

Private by design. Your code and data are processed in your browser. Nothing is uploaded, logged or stored, so it is safe for API responses, configs and other internal data.

About this tool

Understanding regex flags

Flags change how a pattern behaves. g finds every match instead of stopping at the first. i ignores upper and lower case. m makes ^ and $ match at the start and end of each line. s lets the dot match line breaks, and u enables full Unicode support, which matters for emoji and many non-English scripts.

This tester uses your browser's JavaScript regex engine, the same one used in front-end code and Node.js. Patterns run in a separate background worker with a time limit, so a pattern with catastrophic backtracking cannot freeze the page.

Good to know

Regex tips

Be specific

Narrow character classes like [0-9] are faster and safer than .*

Use named groups

(?<year>\d{4}) makes results and replacements easier to read.

Escape special characters

Put a backslash before . ? * + ( ) [ ] { } to match them literally.

Test edge cases

Include text that should not match, not just text that should.

FAQ

Regex Tester FAQs

Which regex flavour is this?

JavaScript (ECMAScript), as used in browsers and Node.js. Most syntax also works in other languages, with some differences.

How do I use groups in replacements?

Use $1, $2 for numbered groups and $<name> for named groups.

Why did my pattern time out?

Nested quantifiers such as (a+)+ can take exponential time on some inputs. Make the pattern more specific.

Is my text uploaded?

No. Everything runs in your browser.

Need extra development capacity?

Hire dedicated developers from iCreativez who work as part of your team.