Developer Utility

Regex Tester

Enter a regular expression and test text to check matches, capture groups, and flag behavior in real time. Useful for validating emails, URLs, phone numbers, dates, hashtags, and code patterns.

Real-time matching Highlights matching results immediately when you enter a regex pattern and test text.
Flag testing Test regex behavior with g, i, m, s, u, and y flags.
Capture groups View match lists and capture groups as JSON and copy the results.

Regex test

Enter a regex pattern and test text to view match previews and result lists.

Expression /.../g
Matches 0 items Groups 0 items Text 0 chars Waiting to test

Match result

Matched strings are highlighted in the preview, and detailed results are shown as JSON.

Waiting to test

Match preview

0items
Enter test text to display matching results here.

Match list

[]

Capture groups

[]

Common regex examples

Click a common pattern to load the regex and sample text immediately.

Help

What is Regex Tester?

Regex Tester is a developer tool that lets you enter a regular expression and check which parts of the test text match.

Use it to find or validate emails, phone numbers, URLs, dates, hashtags, and specific code patterns.

How to use

  1. Enter a pattern in the regular expression field.
  2. Select the flags you need.
  3. Enter the test text.
  4. Check the match preview, match list, and capture groups.
  5. Copy the result or download JSON if needed.
What do the g, i, m, and s flags mean?

g means global search, i ignores case, m enables multiline mode, and s makes the dot (.) match line breaks as well.

What are capture groups?

Capture groups extract parts wrapped in parentheses (). For example, (\d{4})-(\d{2})-(\d{2}) lets you check the year, month, and day separately.

Why does a regex error occur?

Errors can occur when parentheses are not closed, character ranges are invalid, or escape characters are incomplete.

Why are backslashes sometimes written twice?

Inside JavaScript strings, backslashes are escape characters, so code may use \\d. In this input field, you can usually enter the regex pattern directly, such as \d.

Can I enter sensitive text?

Avoid entering real personal information, auth tokens, customer data, or internal logs. Use masked sample text when testing sensitive patterns.