About Regex Tester
The Regex Tester lets you write, test, and debug regular expressions against live text with instant match highlighting. Matches are highlighted in real-time as you type. Captured groups are displayed clearly below the text.
This tool supports full JavaScript (ECMAScript) regex syntax, including lookaheads, lookbehinds, named capture groups, character classes, quantifiers, anchors, and Unicode properties.
Regular expressions are a powerful tool for text processing, data validation, log parsing, search-and-replace, and text extraction. Testing them against real data before using them in your code prevents bugs and saves time.
Everything runs locally in your browser. Your data never leaves your device, and no account or sign-up is required.
How to Use Regex Tester
Enter your regex pattern in the Pattern field.
Select flags: global (g), case-insensitive (i), multiline (m), dotall (s).
Paste your test text in the input area.
Matches are highlighted in real-time and captured groups are shown below.
Examples
Frequently Asked Questions
What regex syntax is supported?
Full JavaScript (ECMAScript) regex syntax including lookaheads (?=...), lookbehinds (?<=...), named groups (?<name>...), character classes, quantifiers, anchors (^ $), and Unicode.
How do I match a literal dot or parenthesis?
Escape special characters with a backslash: \. matches a literal dot, \( matches a literal opening parenthesis.
What does the global flag (g) do?
The global flag finds all matches in the text instead of stopping at the first match.
How do I match an email address?
A basic pattern: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
How do I match a URL?
A basic pattern: https?:\/\/[^\s/$.?#].[^\s]* — for production use consider a well-tested library.
Can I use named capture groups?
Yes — syntax: (?<groupName>pattern). The named groups are displayed in the capture group panel below the text.