What is the Regex Tester?
Regular expressions are powerful and easy to get wrong. Type a pattern and some test text, and see every match highlighted as you type, with the capture groups listed. Add flags such as g (all matches), i (ignore case) or m (multiline) in the flags box.
Features
Live highlighting
Matches shown as you type.
Groups
Each capture group listed.
Flags
Type the flags you need: g, i, m, s, u or y.
How to use the Regex Tester
- 1
Type the pattern and flags.
- 2
Paste the test text.
- 3
Check the highlighted matches.
Who it is for
Form validation
Test email, phone and postcode patterns.
Data cleaning
Build find-and-replace rules.
Tips for better results
- This uses JavaScript regex. PHP and Python are very similar but not identical.
Questions people ask
Is it free?
Yes, free and private.
Which flags work?
g, i, m, s, u and y, as in JavaScript.