Test and debug regular expressions

Test regex patterns with real-time matching and highlighting

Processed Locally • Your Data Stays Private
//
Regex Cheatsheet
.Any character
\dDigit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace
^Start of string
$End of string
*0 or more
+1 or more
?0 or 1
{n}Exactly n
{n,m}Between n and m
[abc]Any of a, b, c
[^abc]Not a, b, c
(abc)Capture group
a|ba or b
(?:abc)Non-capture group

How to Test Regular Expressions

Debug and validate regex patterns with real-time matching, group highlighting, and a built-in cheat sheet. Perfect for developers working with text patterns.

1

Enter Your Pattern

Type your regex pattern in the pattern field. Select flags like global (g), case-insensitive (i), or multiline (m).

2

Add Test Text

Paste or type the text you want to match against. See matches highlighted instantly as you type.

3

Analyze Matches

View all matches, capture groups, and their positions. Use the cheat sheet for pattern reference.

Why Use DevSensei?

What makes DevSensei different from other tools

Real-Time Matching

See matches highlighted instantly as you type. No need to click 'test' - results update live.

Group Highlighting

Capture groups are color-coded for easy identification. See exactly what each group matches.

Built-in Cheat Sheet

Quick reference for common patterns, quantifiers, and special characters. Learn regex as you build.

Frequently Asked Questions

Common questions about this tool

Common issues: forgetting to escape special characters (use \. for literal dot), missing the global flag for multiple matches, or case sensitivity (add 'i' flag). Check our cheat sheet for syntax help.

Use capture groups by wrapping parts of your pattern in parentheses. For example, (\d{4})-(\d{2})-(\d{2}) captures year, month, and day separately from a date string.