Regex Tester
Write a regular expression with its flags, paste some test text, and see every match highlighted with its position and captured groups. A fast way to build and debug patterns like email or phone validators.
What this means
A regular expression is a pattern language for finding text. The tester applies your pattern to each line of test text and lists every match with the character range where it was found.
How we calculate it
Formula
new RegExp(pattern, flags) tested over the text; each match records its index and the captured groups.Worked example
Pattern [a-z]+@[a-z]+\.com against an email list:
- 1Enter the pattern and flags.
- 2Paste the text to test.
- 3Read the match list and positions.
Important assumptions
- Patterns use JavaScript regex syntax, including flags like g, i and m.
Frequently asked questions
What do the flags do?
g matches globally, i is case-insensitive, m makes ^ and $ match line boundaries, s lets . match newlines.
Why does my pattern match nothing?
Check escaping — for a literal dot use \., and remember that + and * apply to the previous element.
Related tools
JSON Formatter
Format, minify and validate JSON with one click.
Base64 Encoder
Encode any text, including Unicode, to Base64.
Hash Generator
Generate MD5, SHA-1 and SHA-256 hashes of any text.
Base64 Decoder
Decode Base64 strings back to readable text.
URL Encoder
Encode text for safe use inside URLs and query strings.
URL Decoder
Decode percent-encoded URLs back to readable text.