Regex Tester

Awaiting input
Pattern
/g
0 ln0 ch0 B
Test string
Paste text to test
0 ln0 ch0 B
Matches
Results appear here
0 ln0 ch0 B
Enter a regex pattern above.

Test regular expressions in your browser

Write a JavaScript (ECMAScript) regex, paste a test string, and see live highlights plus every match with capture groups and named groups. Toggle flags g, i, m, s, u, and y without memorizing syntax.

Everything runs locally in your browser. Patterns and sample data never leave your device — suitable for debugging auth parsers, log filters, and validation rules before shipping code.

  • Live match highlighting
  • Numbered capture groups
  • Named group display
  • g / i / m / s / u / y flags
  • Sample email pattern
  • 100% client-side & free

Frequently asked questions

What is a regex tester?

A regex tester lets you write a regular expression, paste sample text, and see every match with capture groups in real time. It is useful for validating patterns before using them in code, grep, or form validation.

Is my pattern or text sent to a server?

No. Matching runs entirely in your browser with JavaScript RegExp. Your patterns and test strings never leave your device.

What do the g, i, m, s, u, and y flags mean?

g finds all matches (global). i ignores case. m makes ^ and $ match line boundaries. s lets . match newlines (dotAll). u enables Unicode-aware matching. y matches only at the current lastIndex (sticky), usually with g.

Why do I see no matches?

Check for typos in the pattern, missing flags (e.g. i for case-insensitive), or anchors like ^ and $ that restrict where a match can start. An empty pattern matches nothing useful until you enter a regex.

What are capture groups?

Parentheses in a pattern create numbered groups ($1, $2, …). Named groups use (?<name>…). The matches panel lists each group’s captured substring for every match.

Why are results capped at 500 matches?

Very greedy patterns on long text can produce thousands of matches and slow the tab. The tool stops after 500 matches and shows a notice so the UI stays responsive.

Is the Regex Tester free?

Yes. It is free, requires no signup, and works offline after the page loads.

Which regex flavor does this use?

JavaScript (ECMAScript) regular expressions — the same engine used in browsers and Node.js. Some PCRE-only features may not be available.