Regex Tester
Write and test regular expressions with real-time matching, highlighting, and capture group extraction.
What Is a Regex Tester?
A regex tester lets you write a regular expression pattern and instantly see which parts of your test string match. Matches are highlighted in the text, capture groups are extracted and displayed in a table, and errors in your pattern are reported in real time. This tool uses JavaScript's regex engine, making it ideal for testing patterns you'll use in JavaScript, TypeScript, or Node.js projects.
Common Regex Syntax
\d matches any digit (0-9). \w matches any word character (letters, digits, underscore). \s matches whitespace. . matches any character except newline. + means one or more. * means zero or more. ? means optional. {n,m} matches between n and m times. ^ matches the start and $ matches the end. Parentheses () create capture groups. Square brackets [] define character classes.
Regex Flags Explained
Flags change how the regex engine processes your pattern. The g (global) flag finds all matches instead of stopping at the first one. The i flag makes matching case-insensitive. The m (multiline) flag makes ^ and $ match the start and end of each line, not just the entire string. The s (dotAll) flag makes the dot . match newline characters too.