Back to Tools
Regex Tester
Write and test regular expressions. Review matches, view capture groups, and check expressions in real-time.
//
g
Regex Cheat Sheet
.: Any single character\d: Any digit (0-9)\w: Word character (a-z, A-Z, 0-9, _)\s: Whitespace space, tab*: 0 or more times+: 1 or more times?: 0 or 1 time^/$: Line Start / End
Engine Details
This tester runs the ECMAScript (JavaScript) regular expressions implementation built directly into your web browser. Flags and features correspond to native browser execution.
Complete Guide: How to Use the Regex Tester
Writing regular expressions for form input verification, string tokenizers, or textual searches is notoriously complex. Our free online Regex Tester helps you debug regex patterns, highlighting all matches instantly, counting instances, and listing subgroup capture fields, fully client-side.
Step-by-Step Instructions
- Enter your regular expression pattern in the 'Regular Expression' text field (do not include wrapping slashes / /).
- Toggle regex flags like 'Global' (g), 'Case Insensitive' (i), or 'Multiline' (m) using the checkbox selectors.
- Type or paste your sample testing string into the 'Test String' text area.
- Review the 'Highlighted Matches' output box. All matching substrings are highlighted in real-time.
- Check the matches counter and capture groups breakdown to debug regex subpattern brackets.
Key Features & Benefits
- Real-time Matches Highlighting: Shows exactly which segments match your regex pattern on-the-fly.
- Capture Groups Breakdown: Displays parenthesized capture subgroups for each individual regex match.
- Interactive Regex Flags: Easily toggle standard engine flags like Global, Case Insensitivity, and Multiline.
- Safe and Local testing: Executes Javascript's native RegExp engine fully in your browser with zero remote requests.
FAQs about Regex Tester
What is a Regular Expression (Regex)?
How do the Global, Case Insensitive, and Multiline flags work?
What are capture groups in Regex?
Why does my Regex freeze the browser?