~welcome
regex-tester

Regex Tester

test · match · highlight · capture

// common patterns

$ how-to-use

Enter your regex pattern and test string. Matches are highlighted in real-time. Toggle flags (global, case-insensitive, multiline) and view capture groups for each match.

Why Use a Regex Tester?

Regular expressions are powerful but notoriously hard to get right on the first try. A single misplaced character can change what a pattern matches entirely. Testing in a live environment lets you iterate quickly without running your full application.

This tool highlights matches instantly as you type, shows capture group contents, and supports all JavaScript regex flags. It's faster than console.log debugging and safer than testing against production data.

Common Regex Patterns

Email

[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}

URL

https?:\/\/[^\s/$.?#].[^\s]*

Phone Number

\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}

IP Address

\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b

FAQ

Which regex flavor is this?

JavaScript (ECMAScript). This covers most web development use cases. Note that some features like lookbehinds require modern browsers.

What are capture groups?

Parentheses () in a pattern create capture groups — they extract specific parts of a match. For example, (\d+)-(\d+) captures the two numbers separately from "123-456".

Is my data private?

Yes. All pattern matching runs in your browser. No data is sent anywhere.