Text

Regex Tester

Test regular expressions: matches, groups and replacement.

Regular expression

Flags

Test text

Size: 0 BLines: 0Characters: 0

Result

Enter an expression to see matches.

How to use
  1. Enter a pattern and toggle flags (g, i, m, s, u, y, d, v).
  2. Paste test text — matches are highlighted and the list shows indices and groups.
  3. Switch to “Replace” to see the substitution result with $1, $<name>, $& and so on.
  4. Try the ready-made examples to get started quickly.
  • Expressions follow JavaScript rules — exactly as they behave in your code.
  • An expression that is too heavy is stopped after about half a second, so the page never freezes.
  • Limits: text up to 1 MiB and at most 10,000 listed matches. Flags u and v cannot be combined.