Regex Tester

Test patterns with live highlighting

Loadingโ€ฆ

Was this tool helpful?

About this tool

This tool tests a regex pattern against text in real time. Because it runs the browser's actual JavaScript regex engine, whatever pattern you confirm here behaves the same when you paste it into code โ€” matches are highlighted, and capture groups are listed alongside each match.

How to use

  1. Click a common-pattern button (email, Korean phone number, URL, date, and more) to start from an example, or type your own pattern.
  2. Toggle the g (global), i (ignore case), m (multiline), and s (dotAll) flags with the buttons.
  3. Type the string to test in the box below and matching parts are highlighted.
  4. In the match list, check each match's position (@index) and its capture group values.

Frequently asked questions

Which regex flags does this support?
You can toggle four: g (global search), i (case-insensitive), m (multiline, so ^ and $ work per line), and s (dotAll, so . also matches newlines). Flags like u (unicode) or y (sticky) are not exposed as toggles here.
Why do I still see multiple matches even with the g button off?
This tool always searches internally with the g flag on so it can find every match position. The on-screen g button is meant to record which flag combination you'd use in your actual code โ€” toggling it does not change the match results shown here.
How do I check capture groups?
If your pattern has parenthesized groups, each match in the list shows its group values in order. A group that did not match is shown as 'none'.
Does entering very long text slow things down?
No โ€” to avoid an infinite loop from a pattern that keeps matching an empty string, the search stops after at most 1000 matches.

Similar tools