Regular Expression Tester
A small mistake in an email pattern can block valid addresses. This tester runs JavaScript patterns directly in your browser. Type your pattern, add samples, see matches instantly. Toggle flags for case sensitivity. Everything runs locally.
Step by step
- Type your pattern in the pattern field.
- Toggle g, i, m flags as needed.
- Paste positive and negative samples, one per line.
- Review matches and adjust the pattern.
- Copy the final pattern into your form code.
Example scenario
For a signup email check, enter the pattern and samples like name@example.com and broken variants. Only the first matches. Try uppercase with and without the i flag to see the difference.
Check your result
Test at least five matching and five non-matching examples. Toggle flags one by one. Check longer inputs for slow performance before final use.
Frequently asked questions
Which engine?
The JavaScript engine. Final-check inside your own code.
Why no match?
Anchors, flags, or hidden whitespace are common causes.
Paste real user data?
Better avoid it; use synthetic addresses.
Slow browser?
Nested quantifiers can be slow; simplify.
Open the tool: Regular expression tester →
Keep an original copy before processing your file. Examples are illustrative; results depend on your document.