~/tools / Regex Tester
Regex Tester
See exactly where a regular expression matches your text, highlighted live. Uses JavaScript's (ECMAScript) regex engine.
Regular expressions rarely behave the way you expect on the first try. This tool lets you experiment right in the browser without writing any code — handy for validation patterns or log-extraction regexes.
# Use Cases
- Checking that a form-validation regex actually matches the inputs you intend
- Prototyping a pattern to extract matching lines out of a large log file
- Figuring out exactly what someone else's regex matches
# Usage
- Enter your pattern between the slashes, and flags (g, i, m, etc.) in the box on the right.
- Paste the text you want to test against in the box below.
- Matches are highlighted in yellow automatically, with a match count shown.
//
Matches (2)
Contact us: support@example.com / sales@example.co.uk
# FAQ
- Which flags are supported?
- All standard JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dot matches newline), and more.
- What happens without the g flag?
- Only the first match is highlighted. Add the g flag to see every match in the text.
# Related
# Learn more on our sister sites
- Regular expressions in JavaScript
Practise match and test hands-on — prodou.net
- Regular expressions in Python
Practise the re module hands-on — prodou.net