Regex Tester & Debugger

Test regular expressions with real-time matching, capture group highlighting, and detailed match information. Works offline, 100% client-side.

Advertisement
Regular Expression
/ /
Test String
Results
0 matches
Enter a pattern and test string to see matches...
Advertisement
Quick Reference

Character Classes

.Any character
\dDigit [0-9]
\wWord [a-zA-Z0-9_]
\sWhitespace
[abc]a, b, or c
[^abc]Not a, b, or c

Quantifiers

*0 or more
+1 or more
?0 or 1
{3}Exactly 3
{3,}3 or more
{3,5}3 to 5

Anchors

^Start of string
$End of string
\bWord boundary

Groups

(abc)Capture group
(?:abc)Non-capture
(?<name>)Named group
a|ba or b

How to Use Regex Tester

What is a regular expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. It's used for pattern matching in strings, validation, find-and-replace operations, and parsing text data.

How do I test a regex pattern?

Enter your regex pattern in the pattern field (between the slashes), add any flags you need (g for global, i for case-insensitive, m for multiline), then enter your test string. Matches are highlighted in real-time.

What are capture groups?

Capture groups are portions of a regex enclosed in parentheses (). They allow you to extract specific parts of a match. Named groups use the syntax (?<name>pattern) for clearer code.

Is this regex tester offline capable?

Yes! Once loaded, this regex tester works completely offline. All pattern matching happens in your browser using JavaScript's built-in RegExp engine. No data is sent to any server.