Regex Tester - Test & Debug Regular Expressions Online
Test and debug regular expressions with real-time match highlighting
Developer Tools
Tool
//g
How to Use
1Enter your regular expression pattern in the pattern field
2Toggle the flags you need (g for global, i for case-insensitive, etc.)
3Paste or type your test string in the text area
4Matches are highlighted in yellow in the preview and listed below with indices
Frequently Asked Questions
This tool uses JavaScript's built-in RegExp engine (ECMAScript), which supports standard features including lookaheads, lookbehinds, named capture groups, and Unicode property escapes (with the u flag).
g (global) finds all matches rather than stopping at the first; i (case-insensitive) ignores letter case; m (multiline) makes ^ and $ match start/end of each line; s (dot-all) makes . match newline characters; u (unicode) enables full Unicode matching.
Use the syntax (?<name>...) to define a named group. For example, (?<year>\d{4})-(?<month>\d{2}) on "2024-03" will capture groups year="2024" and month="03", which are shown in the match details below the preview.