How to test a regular expression
- Type your pattern, without the surrounding slashes.
- Add flags:
gto find every match,ito ignore case. - Paste test text. Matches are highlighted and listed with their groups.
- Optionally type a replacement, using
$1for 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.
