Regex Tester: Test Regular Expressions Online

Write a regular expression and watch every match light up in your test text, with each capture group listed and a live replacement preview. Uses the JavaScript flavour.

loading tool

How to test a regex

  1. Type the pattern and flags.
  2. Paste the test text.
  3. Read the highlighted matches and groups; add a replacement to preview it.

Good to know

  • Common flags: g every match, i ignore case, m ^ and $ per line, s dot matches new lines, u Unicode.
  • Named groups like (?<year>\d{4}) are listed by name.

Questions

Is my data private?

Yes. Everything happens inside your own browser: nothing you type or choose is uploaded to us or anyone else.

Is it free?

Completely free, with no sign-up, no watermark and no limit on how many times you use it. Light ads keep the site running.