Regex Tester

Test regular expressions with real-time matching and pattern library

Regular Expression Pattern

//
gimsuy

Flags

Test String

Enter test string here...

Match Details & Explanation

Pattern Explanation

\b - Word boundary
+ - One or more of the preceding element
{n,m} - Between n and m repetitions
[...] - Character class (any one character inside brackets)
| - Alternation (OR)
. - Any character (except newline)

No matches found

Try adjusting your pattern or test string

Pattern Library

Quick Reference Guide

Character Classes

.Any character except newline
\dAny digit (0-9)
\DAny non-digit
\wAny word character (a-z, A-Z, 0-9, _)
\WAny non-word character
\sAny whitespace character
\SAny non-whitespace character
[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Any lowercase letter

Quantifiers

*Zero or more
+One or more
?Zero or one (optional)
{3}Exactly 3
{3,}3 or more
{3,5}Between 3 and 5

Anchors

^Start of string/line
$End of string/line
\bWord boundary
\BNot a word boundary

Groups

(abc)Capturing group
(?:abc)Non-capturing group
(?<name>abc)Named capturing group
\1Backreference to group 1

Lookaround

(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind

Special

|Alternation (OR)
\Escape special character
\nNewline
\tTab
\rCarriage return

All processing happens in your browser • Privacy-focused • No data sent to server