Test a regular expression

Live highlighting, groups, flags and replace preview.

Runs on your device — never uploaded

How to test a regular expression

  1. Enter a pattern

    With flags such as g, i, m, s, u.

  2. Paste test text

    Matches highlight as you type; groups are listed.

  3. Try a replacement

    See the substituted output with $1-style references.

Frequently asked questions

Which regex flavour is this?
JavaScript (ECMAScript), which covers most syntax shared with PCRE, Python and Go.
Can I share a regex?
Yes. The pattern, flags and text are encoded in the URL fragment, which never reaches a server.
Is my text uploaded?
No.

More developer tools