Regex Tester

Instant Load 🛡️ Privacy Verified 🔌 Offline Safe
Regular Expression
/ /
Test String
Results
0 Matches Found
No matches yet
Group Details
Select a match to see groups
Cheat Sheet
. Any character
\d Digit [0-9]
\w Word char [a-z0-9_]
\s Whitespace
[abc] Any of a, b, or c
a|b Either a or b
* Zero or more
+ One or more
? Zero or one
{n} Exactly n times
📖

How to use Regex Tester

This is the Regex Tester utility. 100% client-side and offline capable.

Common Questions

What is a Regular Expression (Regex)?

A Regular Expression, or Regex, is a sequence of characters that forms a search pattern. It is used for string matching, search-and-replace operations, and data validation across almost all programming languages.

How do I test a regex against multiple lines?

To test across multiple lines, ensure the m (multiline) flag is active. This allows the ^ and $ anchors to match the start and end of each line instead of just the start and end of the entire string.

What do the flags 'g' and 'i' mean?

The g flag stands for 'global', meaning it finds all matches in the text rather than stopping after the first one. The i flag stands for 'case-insensitive', making the search ignore uppercase and lowercase differences.

Is my regex data shared or stored?

No. Like all our tools, the Regex Tester runs entirely in your browser. Your expressions and test strings never leave your machine, ensuring complete privacy even for sensitive data.

Does this tool support Lookbehind and Lookahead?

Yes! Our tool uses the modern JavaScript regex engine which supports positive/negative lookahead (?=, ?!) and positive/negative lookbehind (?<=, ?).

How can I see captured groups?

When you have matches, click on any match in the 'Results' sidebar. The 'Group Details' panel will then display all captured groups (including named groups) for that specific match.