Security tools

Regex Tester

Test a JavaScript regular expression, see every match and group, and stop runaway patterns.

Flags
0 characters

Your text stays on your deviceHow?

How to test a regular expression

  1. Type the pattern and tick the flags you need.
  2. Paste the text to test it against.
  3. Read the highlighted matches and the table of positions and groups.

Questions

Which regular expression flavour is it?

JavaScript's, as your browser runs it, with the flags g, i, m, s, u and y.

Why was my pattern stopped?

It ran for more than a second. Patterns with nested repetition, such as (a+)+, can take a very long time on some text; this is called catastrophic backtracking.

Is my text sent anywhere?

No. The pattern runs inside your browser, and nothing leaves your device.

How many matches does it show?

All of them are counted, and the first 1,000 are highlighted and listed.