RegEx Tester
Test regular expressions with live matches and highlights.
Use this free online regex tester to test and debug JavaScript regular expressions in real time. Highlight matches, inspect capture groups, and experiment with flags instantly. Whether you're validating input, parsing logs, or building search patterns, this tool provides immediate visual feedback without sending data to a server.
About this tool
Test Regular Expressions Live
Test and validate regular expression patterns with live match highlighting and detailed match lists.
- Supports common regex flags (g, i, m, s, u, y)
- Shows individual capture groups
- Inline match highlighting for easier debugging
- Error reporting for invalid regex syntax
- Works entirely in your browser with no server processing.
Debug Patterns Faster
Use the match list to confirm your pattern and flags before deploying it in code.
- Verify greedy vs. lazy quantifiers
- Test multiline anchors (^ and $)
- Identify unexpected overlapping matches
How to Use RegEx Tester
Enter Pattern
Type your regex pattern in the top input. Toggle flags like 'Global' (g) or 'Case Insensitive' (i) using the buttons.
Add Test Text
Paste the text you want to test against in the large text area below.
Analyze Matches
Highlighted matches appear instantly in the text. Check the sidebar (or bottom on mobile) for a detailed list of match groups and indices.
Common questions
What is a regular expression?
A regular expression (regex) is a pattern used to match, search, and manipulate text. It is commonly used for input validation, parsing, and text processing in programming languages.
Which regex flavor is used?
It uses the browser's built-in JavaScript (ECMAScript) regex engine. This is fully compatible with Node.js and modern frontend frameworks.
Does this support PCRE or Python regex?
This tool uses the browser's JavaScript (ECMAScript) regex engine. Features specific to PCRE, Python, or other regex engines may not be supported.
Does it support Lookbehind?
Yes, positive and negative lookbehind `(?<=...)` is supported in all modern browsers (Chrome, Edge, Firefox, Safari).
Why does my pattern match everything?
Patterns like `.*` can match large portions of text because `.` matches any character and `*` allows unlimited repetition. Consider using more specific character classes or lazy quantifiers like `.*?`.
How do I match newlines?
Enable the 'Multiline' (m) flag to make `^` and `$` match start/end of lines, or use the 'Dot All' (s) flag to make `.` match newline characters.
Is my data saved?
No. Your patterns and test text remain locally in your browser and are not sent to any backend.
Related tools