Regex Tester

Test and debug regular expressions in real-time. This tool helps you build, test, and understand regex patterns. See matches highlighted, test against sample text, and get detailed match information. Perfect for learning regex or debugging complex patterns.

When to use this tool

You are writing or debugging a complex regex pattern.

You want to see all matches and capture groups at once.

Examples

Capture email domains

Input

Pattern: ([\w.-]+)@([\w.-]+)
Text: dev@example.com

Output

Full match: dev@example.com
Group 1: dev
Group 2: example.com

Capture groups make it easier to extract the exact part of a match.

Developer use cases

Validate user input such as UUIDs, emails, or slugs.

Extract identifiers from logs or API responses.

Common mistakes to avoid

Forgetting to escape special characters like . or ?.

Using greedy quantifiers when a lazy match is required.

Format and behavior notes

Use flags like i for case-insensitive matching and g for repeated matches.

Escape special characters when you want to match them literally.

Test against realistic sample text before using a regex in production.

Frequently Asked Questions

How do I test a regex pattern?

Enter your regular expression in the pattern field and test text in the text field. The tool will highlight all matches in real-time.

What regex features are supported?

The tool supports standard JavaScript regex features including character classes, quantifiers, groups, lookaheads, and more.

Can I see match details?

Yes, the tool shows all matches with their positions, groups, and captured values for detailed analysis.