Free Online Regex Tester

Write regex patterns, set flags, and see matches highlighted in real time.

About Regex Tester

Regular expressions (regex) are powerful patterns used to search, match, and manipulate text. Our Regex Tester lets you write a pattern, choose flags, and instantly see all matches highlighted directly in your test string. The match list shows each match with its position index.

How to Use

Regex Tips

Common patterns include \d+ for numbers, \w+ for words, [a-z]+ for lowercase letters, ^ for start of line, and $ for end of line. Use parentheses for groups and | for alternation. Backslashes must be escaped in certain contexts.

Related Tools

Frequently Asked Questions

Do I need to add slashes around my pattern?
No. Enter the pattern directly without surrounding slashes. The tool constructs the regex from your input and the selected flags automatically.
What does the global (g) flag do?
The global flag tells the regex engine to find all matches in the string rather than stopping after the first match.
Why is my pattern not matching?
Check that you have the correct flags set. The case-insensitive (i) flag is needed to match regardless of letter case. Also verify that special regex characters are properly escaped with a backslash.
Can I use lookaheads and lookbehinds?
Yes, modern browsers support lookaheads (?=...), negative lookaheads (?!...), lookbehinds (?<=...), and negative lookbehinds (?
Is my test data stored anywhere?
No. All regex testing happens entirely in your browser using JavaScript. No data is sent to any server.