EZ
EZ2Conv

Regex Tester

Test and debug JavaScript regular expressions in real time as you type, with matched text highlighted directly in your sample. Toggle the g, i, m, s, u, and y flags, inspect captured and named groups with their positions, and view live match statistics.

Find all matches (not just the first)
14px
Output will appear here...

How to Use

  1. Enter regex pattern
  2. Enter text to test
  3. Set flags (g, i, m, etc.)
  4. Check match results and groups
  5. Real-time regex testing
  6. Match result highlighting
  7. Group analysis and extraction
  8. Various flag support
  9. Features

Testing and Debugging Regular Expressions

What this tester does

A regular expression is a compact pattern that describes a set of strings — the shape of an email, a date, a phone number, or any recurring text structure. This tool compiles the pattern you type using your browser's JavaScript regex engine and runs it against your sample text the moment you make a change, so there is no separate 'run' step. Every substring that matches is highlighted in place, and a details panel lists each match with its captured groups and character position.

Because it uses the same engine that powers RegExp in JavaScript and Node.js, what you see here is exactly what your code will do.

When to use it

Reach for it whenever a pattern is not behaving the way you expected. Instead of scattering console.log statements and re-running a script, you paste representative text, adjust the pattern, and watch the highlights shift in real time. It is equally useful for building a pattern from scratch — start loose, then tighten it until only the intended matches light up.

The live statistics — total matches, group count, pattern and text length, and processing time — help you spot catastrophic backtracking or an accidentally greedy quantifier before it reaches production.

Example: matching a date

Suppose you want to pull ISO dates out of a log. The pattern (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) matches 2026-07-18 and splits it into three named groups: year, month, and day. With the g flag enabled, every date in the text is captured, not just the first. Swapping \d{2} for \d{1,2} would also accept single-digit months like 2026-7-8.

Notes and edge cases

Flags change everything: i makes the match case-insensitive, m lets ^ and $ anchor to each line, s allows the dot to match newlines, and u enables full Unicode handling. Remember that characters like . * + ? ( ) [ ] { } \ | ^ $ are special and must be escaped with a backslash to match them literally — to find a literal dot, write \. rather than ., which matches any character. Unnamed groups are numbered from 1 in the order their opening parenthesis appears, while (?:...) creates a group that does not capture.

Frequently Asked Questions

Yes — you can test unlimited patterns against text of any length, with match highlighting, group inspection, and the live statistics panel all available. There are no premium flags, saved-pattern limits, or accounts to create.
Your pattern and test text never leave your device. Both are handed straight to the browser's built-in RegExp engine and evaluated locally, so even sensitive sample data like log lines or user records stays on your machine.
No. Type a pattern, paste some test text, and matches appear immediately — there is no registration, email, or sign-in between you and the results.
All six JavaScript flags: g (global, find every match), i (case-insensitive), m (multiline anchors), s (dot matches newlines), u (Unicode), and y (sticky). Toggle any combination and the results update instantly.
A plain group like (\d{4}) is captured and referred to by its number — group 1, group 2, and so on. A named group like (?<year>\d{4}) does the same but is labelled, so you can read year instead of counting parentheses. The match details panel shows both, along with each group's position in the text.
The usual culprit is an unescaped special character — . * + ? ( ) [ ] { } and friends have their own meaning, so a literal dot must be written as \. and a literal question mark as \?. Also check your flags: without g only the first match is returned, and without i the match is case-sensitive.