Free Regex Tester

Test regular expressions with live highlighting of matches. Supports global, case-insensitive, multiline, and dotall flags. Runs in your browser — your data never leaves your machine.

Regex Tester
Regular Expression
//
Test String

⚡ Live Matching

Matches update instantly as you type your pattern or test string. No button click needed — see results in real time.

🎛️ Flag Controls

Toggle global, case-insensitive, multiline, and dotall flags with one click. Or type them directly in the flags field.

📊 Match Details

See every match with its index position, length, and content in a clear table. Named capture groups are shown when present.

How to Test Regular Expressions

Enter your regex pattern in the pattern field and your test string in the text area below. Matches are highlighted in real time as you type. Use the flag buttons to toggle global, case-insensitive, multiline, and dotall modes. The match details table shows the index, length, and content of every match.

Understanding Regex Flags

Regex flags modify how the pattern is applied. The g (global) flag finds all matches instead of stopping at the first. The i flag makes the match case-insensitive. The m (multiline) flag makes ^ and $ match the start and end of each line, not just the whole string. The s (dotall) flag makes . match newline characters as well.

Frequently Asked Questions

What regex flags are supported?
The tool supports four flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), and s (dotall — . matches newlines). You can toggle them with the flag buttons or type them directly.
Does it support capture groups?
Yes — the tool supports both numbered and named capture groups. Named groups (using ?<name> syntax) are shown in the match details when present.
Is this JavaScript regex?
Yes — the tool uses JavaScript's built-in RegExp engine, so the syntax and behavior match what you'd get in any JavaScript or TypeScript environment. This includes features like lookahead, lookbehind, and Unicode property escapes.
Does it update in real time?
Yes — matches are highlighted and the match details table updates instantly as you type your pattern or test string. No button click needed.
Is this tool free?
Yes — completely free, forever. No sign-up, no account, no usage limits.
Is my data safe?
All regex testing happens locally in your browser using JavaScript. Nothing is uploaded to any server. It's safe to use with sensitive or proprietary data.