Skip to content

Regex tester

Test regular expressions with live matches.

g all, i ignore case, m multi-line, s dot matches new line, u unicode

Matches

Matches
0
Time
0

Uses JavaScript regular expressions, the same as Chrome, Node.js and most web tools. Patterns that take more than 2 seconds are stopped.

Done in your browser. Your text is not saved or sent anywhere.

How to test a regular expression

  1. Type your pattern, without the surrounding slashes.
  2. Add flags: g to find every match, i to ignore case.
  3. Paste test text. Matches are highlighted and listed with their groups.
  4. Optionally type a replacement, using $1 for the first group.

Handy patterns

  • Pakistani mobile number: 03d{2}-?d{7}
  • CNIC: d{5}-d{7}-d
  • Email (simple): [w.+-]+@[w-]+.[w.]+

Why did my pattern stop?

Some patterns, like (a+)+, can take a very long time. Pockit stops them after 2 seconds so your browser does not freeze.

Is my text saved or uploaded?

No. Everything happens in your browser. Nothing you type is sent to Pockit or anyone else.