Online Regex Tester — Test Regular Expressions

Test regular expressions online, highlight matches, inspect capture groups, apply flags, and replace text. Everything runs locally in your browser.

Online Regex Tester — Test Regular Expressions

✓ No sign-up✓ Data stays in your browser✓ Matches · groups · replace

Regular expression workspace

Expression flags

Replacement uses the same flags. $& means the full match, $1 is the first capture, $<name> is a named capture.

 

Up to 80,000 text characters, 500 pattern characters, and 500 matches per run. Execution is limited to 2 seconds.

Highlighted matches

 

Highlighting the first 150 matches; up to 500 are listed.

Matching text

 
Matches: 0Text characters: 0

Capture groups

Groups appear when you use parentheses (...) or (?<name>...).

Replace preview

How to use Regex Tester

  1. Enter a pattern without the surrounding slashes (for example, \d+).
  2. Select flags: g for all matches, i to ignore case, m for multiline, s to include newlines, and u for Unicode.
  3. Paste test text and click “Test regex”. Matches and capture groups appear below.
  4. Optionally enter replacement text ($1, $&, $<name>) and export matches as CSV or replaced text as TXT.

How regular expressions work

Regex helps you search, validate, and replace text using patterns for addresses, numbers, dates, and repeated delimiters. This tool uses JavaScript RegExp syntax; some PCRE-specific syntax is not supported.

Privacy

Your patterns and test text are processed locally in your browser and are not sent to CrazyFB or third-party APIs. An isolated Web Worker with a time limit helps protect the page from slow expressions.

Frequently asked questions

What does the g flag do?

It finds all matches. Without g, only the first match is returned.

Can it handle international text?

Yes. The u flag enables Unicode-aware matching, including property classes such as \p{L}+.

Why was my regex stopped?

Some patterns take a very long time to evaluate. The tool stops a run after roughly 2 seconds to prevent your tab from freezing.

Are capture groups supported?

Yes. Numbered and named captures are displayed; replacements can use $1, $2, and $<name>.

Is my data sent to a server?

No. Pattern processing and exports happen on your device.