✨ Developer Tools

Regex Tester

Test regular expressions in real-time with live match highlighting, capture groups display, and a library of common patterns.

/ /
Enter a regex pattern above
Test String 0 chars

📚 Common Patterns — click to load

📧 Email
[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}
🌐 URL
https?:\/\/[^\s/$.?#].[^\s]*
📱 Phone (IN)
(\+91|0)?[6-9]\d{9}
🔒 Strong Password
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
🌍 IPv4 Address
\b((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}
📅 Date (YYYY-MM-DD)
\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])
💳 Credit Card
\b(?:4\d{3}|5[1-5]\d{2}|6011|3[47]\d{2})[\s\-]?\d{4}[\s\-]?\d{4}[\s\-]?\d{4}\b
#️⃣ Hex Color
#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})\b
🔑 JWT Token
eyJ[A-Za-z0-9_\-]+\.eyJ[A-Za-z0-9_\-]+\.[A-Za-z0-9_\-]+
🐙 GitHub Username
^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$

JWT Decoder  |  API Request Tester →

What are Regular Expressions (Regex)?

A Regular Expression (commonly known as Regex or RegExp) is a powerful sequence of characters that forms a search pattern. These patterns are widely used by developers for string searching, validation (like checking if an email is formatted correctly), replacing text, and data extraction within programming languages like JavaScript, Python, and PHP.

How to Test Regex Patterns

Writing regular expressions can be notoriously difficult to get right on the first try. Our online Regex Tester helps you debug your patterns interactively. As you type your regex in the top field, the tool instantly evaluates it against your test string and highlights all matches in real-time. If your pattern includes Capture Groups (using parentheses), the tool will extract and display those groups in a structured list below the text area.

Supported Regex Flags

Regular expressions can be modified using "flags" that change how the search is performed. Our tester supports the standard JavaScript regex flags:

Frequently Asked Questions (FAQ)

Which Regex engine does this tool use?

Because this tool runs in your web browser, it relies on the JavaScript RegExp engine (ECMAScript flavor). While regex syntax is mostly standardized, there are slight differences between JS, PCRE (PHP), and Python. Most common patterns will work identically across all engines.

Is my test data uploaded anywhere?

No. Your regex patterns and test strings are evaluated locally using your browser's JavaScript engine. We do not store, track, or upload any of the data you paste into the tester, making it safe for debugging production logs or sensitive user data.

What are Capture Groups?

Capture groups are created by wrapping part of your regex in parentheses ( ). They allow you to extract specific parts of a matched string. For example, in the regex (\d{4})-(\d{2})-(\d{2}), you are not just matching a date, but "capturing" the year, month, and day separately. Our tool visualizes these groups so you can verify your extractions.