Pattern
/ /
Test String

How to use the Regex Tester

Enter a regular expression pattern in the Pattern field and paste or type your text in the Test String area. Matches are highlighted in real time. Toggle flags below the pattern to change matching behaviour — enable g to find all occurrences, i for case-insensitive matching, or m to treat each line as a separate string.

Capture groups (parentheses) are shown in the match list alongside their index and character position. If your pattern contains a syntax error, the error is displayed beneath the pattern field.

Common regex patterns

[\w.+-]+@[\w-]+\.[a-z]{2,} — email address
https?:\/\/[^\s]+ — URL
^\d{4}-\d{2}-\d{2}$ — ISO date (YYYY-MM-DD)
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b — IPv4 address
[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12} — UUID v4

Frequently asked questions

What is a regex tester?

A regex tester lets you write a regular expression and immediately see which parts of a string it matches — without writing or running code locally.

What flags does this tool support?

Five standard JavaScript flags: g (global — find all matches), i (case-insensitive), m (multiline), s (dot-all — . matches newlines), and u (unicode).

Can I use capture groups?

Yes. Wrap any sub-pattern in parentheses to create a capture group. The match list shows each group's matched value alongside its index and character position in the input.

Does the tester run in the browser?

Yes — it uses the browser's built-in JavaScript RegExp engine. Nothing is sent to a server.