Regex Tester

Test and debug regular expressions in real-time. See matches highlighted as you type, with group capture display.

🔍 Regular Expression
/ / g
Flags:
📝 Test String
✨ Match Results 0 matches
Test string with matches highlighted will appear here...
Captured Groups
No groups captured yet.

What is a Regular Expression?

A regular expression (regex or regexp) is a sequence of characters that defines a search pattern. Regex is used in programming to match, search, and manipulate strings. It's supported natively in virtually every programming language including JavaScript, Python, Java, PHP, Ruby, and more.

Regex is one of the most powerful tools in a developer's toolkit — but also notoriously hard to write correctly without testing. That's why a live regex tester like this one is invaluable during development.

Regex Flags Explained

Common Regex Patterns

Frequently Asked Questions

Which regex flavor does this tester use?
This tester uses JavaScript's built-in RegExp engine, which follows the ECMAScript regex standard. This is the same regex used in Node.js, Chrome, Firefox, and all modern browsers.
What are capture groups in regex?
Capture groups are defined by parentheses in your regex pattern. They let you extract specific parts of a match. For example, the pattern (\d{4})-(\d{2})-(\d{2}) on "2026-04-23" would capture "2026", "04", and "23" as three separate groups.
Why is my regex not matching anything?
Common reasons: (1) Missing the 'g' flag when expecting multiple matches, (2) Incorrect escaping — special characters like . * + ? need a backslash prefix, (3) Case mismatch — add the 'i' flag for case-insensitive matching, (4) Anchors (^ and $) preventing matches on partial strings.