Skip to content
Rotina Diária

Regex tester

Test regular expressions in real time with highlighting, capture groups, and replacement.

//g

Replace

Processed on your device. Nothing you type is sent anywhere.

How to use: Regex tester

  1. Enter the expression (without slashes) and select the flags — g, i, m, s, u.
  2. Paste your test text to see highlighted matches and the capture group table.
  3. Use the replacement section with $1, $2, or $<name> to test a replacement.

About this tool

This tool uses your browser's built-in regular expression engine (JavaScript/ECMAScript syntax), the same one used by Node.js and TypeScript. Named groups (?<name>...), lookbehind, and Unicode property classes (\p{L} with the u flag) are supported.

Built-in examples include patterns for common formats such as phone numbers, dates, and currency. Remember, a regex checks the format, not the content — a value can match the pattern and still be invalid.

Frequently asked questions

Will this regex work in Python, PHP, or C#?

Most of the syntax is shared, but there are differences (variable-length lookbehind, flags, and named groups using ?P in Python). This tool uses JavaScript regex syntax.

Why did the page freeze when I used my expression?

Patterns with nested quantifiers, such as (a+)+, can cause "catastrophic backtracking" and take a long time to process certain text. Rewrite the pattern to make it more specific.

Is it really free? Is there a daily limit?

It's free with no daily limits. Processing happens on your device, so there's no per-use cost and no need to limit you.

Does it work on phones?

Yes. The site works in any modern browser on Android, iPhone, Windows, Mac, and Linux—no installation needed.