Regex Tester

Write a regular expression and instantly see what it matches.

Features

  • Live matches with index and capture groups.
  • Replace preview with $1, $2 and named groups.
  • Runs in a Web Worker with a 1-second timeout, so a runaway pattern can't freeze your browser.

Handy Indian patterns

  • PIN code: ^[1-9][0-9]{5}$
  • Indian mobile: ^[6-9]\d{9}$
  • PAN format: ^[A-Z]{5}[0-9]{4}[A-Z]$

Frequently asked questions

Which regex flavour is this?

JavaScript (ECMAScript). It is mostly compatible with Python and PCRE for common patterns.

What does 'timed out' mean?

The pattern is probably backtracking exponentially (for example (a+)+). Rewrite it to be more specific.

Is my text sent anywhere?

No.

More text and developer tools

See all text and developer tools โ†’