Regex Tester

Test and validate regular expressions

Share this tool

Report a problem

Describe the problem without including private input or files.

How useful was this tool?

How useful was this tool?

Pattern and test text

Flags

Matches update when you pause typing. Your data stays on this device.

Common patterns
Regex tips

Use \b for word boundaries to match whole words only.

? makes quantifiers non-greedy (match as few characters as possible).

Use parentheses () to create capturing groups for extracting parts of matches.

(?:...) creates non-capturing groups for grouping without capturing.

^ and $ match start and end of string (or line with the m flag).

Test your regex thoroughly with various inputs to avoid false positives.

Matches 0

Enter a pattern to see matches.

 

Highlighted text

Enter test text to see highlighted matches.

Pattern explanation

Pattern components will appear here.

About the Regex Tester

Our regex tester is a free online tool that lets you write, test, and debug regular expressions in real time with instant visual feedback. Regular expressions (regex) are powerful pattern-matching sequences used in virtually every programming language for searching, validating, and manipulating text. This tool makes it easy to experiment with patterns and see results immediately.

The tester provides a complete regex development environment with match highlighting, capturing group inspection, position tracking, and automatic pattern explanation. As you type your regex pattern, the tool instantly highlights all matches in your test string, displays detailed match information including groups and indices, and explains what each component of your pattern does.

For a sign-up form email check, a log parser that pulls timestamps and status codes, or a first lesson in capture groups, start from the built-in library of common regex patterns for emails, phone numbers, URLs, IP addresses, dates, HTML tags, credit cards, hex colors, and more. Load a preset to study how it works or use it as a starting point for your own patterns.