π― Regex Tester Online
Test regular expressions online. Enter a pattern and text to highlight matches, with templates for email, URL, and phone numbers.
//
Templates:
About regex testing
Regular expressions are used to match, extract and validate text. This tool runs JavaScript regex live in your browser, supports common flags and highlights matches and capture groups.
Email, URL, phone, ID-number and IPv4 templates let you start quickly. Inputs stay local and are never uploaded.
How to use it
Enter a pattern and flags such as g or i, then paste the test text below. Results update as you type.
- g: global; i: case-insensitive; m: multiline; s: dot matches newlines; u: Unicode; y: sticky.
- Matches are highlighted with their index and capture groups.
- Click a template to fill in a common pattern.
Common uses
- Validate form fields such as email, phone or URL.
- Extract IPs, timestamps or order IDs from logs.
- Debug replacement rules and capture groups.
FAQ
- Why is my regex not matching?
- Check escaping, flags, and whether ^ or $ is anchoring the match. Regex dialects differ between languages; this tool uses JavaScript syntax.
- What do g and i mean?
- g searches globally for every match; i ignores case. Flags can be combined, for example gi.
- Can I replace text here?
- This tool is for testing matches and inspecting groups. Do bulk replacements in an editor or in code so you do not accidentally modify the source data.