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.
Regex test
Enter a regex pattern and test text to view match previews and result lists.
/.../g
Match result
Matched strings are highlighted in the preview, and detailed results are shown as JSON.
Match preview
0itemsMatch 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
- Enter a pattern in the regular expression field.
- Select the flags you need.
- Enter the test text.
- Check the match preview, match list, and capture groups.
- 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.