Matching Options

Match Results

Match Count: 0
Execution Time: 0ms
No match results

Common Regular Expression Examples

Email Address

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

Phone Number

^1[3-9]\d{9}$

ID Card

^\d{17}[\dXx]$

IP Address

^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

How To Test A Regular Expression

Paste your regular expression into the pattern field, add sample text, choose the flags you want to test, and review the highlighted matches. A good regex test includes both values that should match and values that should not match. This makes it easier to catch patterns that are too broad, too strict, or missing an important edge case.

The tester is especially useful when debugging extraction patterns for logs, CSV-like text, URLs, dates, emails, IDs, and user-generated input. It lets you see how global, case-insensitive, and multiline matching changes the result before you paste the expression into application code.

Testing Checklist

Start with anchors if the whole value must match, such as a form field. Remove anchors if you are searching inside longer text. Add a few invalid examples so you can detect false positives. If a match is unexpectedly missing, check escaping, whitespace, line breaks, and whether the regex engine supports the syntax you used.

Regex Tester FAQ

What does the global flag do? The global flag finds every match instead of stopping after the first one.

When should I use multiline mode? Use multiline mode when `^` and `$` should match the start and end of each line rather than only the start and end of the full text.

Can I test generated patterns here? Yes. Generate a first draft in the Regex Generator, then test it here with realistic examples and edge cases.