...

Search Tools

Search for a command to run...

Regex Tester

Test and debug regular expressions with real-time matching, match highlighting, and capture group display.

Regular Expression
0 matches
//g
Test String
Match Results
Enter a pattern and test string to see matches highlighted here
Common Patterns
Click a pattern to use it
EmailURLIPv4IPv6Phone (US)Date (ISO)TimeHex ColorCredit CardUsernamePassword (Strong)HTML TagWhitespaceDigitsWord
Quick Reference

Flags

gGlobal - Find all matches
iIgnore case - Case-insensitive matching
mMultiline - ^ and $ match line breaks
sDot all - . matches newlines
uUnicode - Enable full Unicode matching
ySticky - Match from lastIndex
dIndices - Include match indices

Character Classes

.Any character except newline
\dDigit (0-9)
\DNot a digit
\wWord character (a-z, A-Z, 0-9, _)
\WNot a word character
\sWhitespace character
\SNot whitespace
[abc]Any character in brackets
[^abc]Any character not in brackets

Quantifiers

*0 or more occurrences
+1 or more occurrences
?0 or 1 occurrence
{n}Exactly n occurrences
{n,}n or more occurrences
{n,m}Between n and m occurrences

Anchors

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

Escape Sequences

\nNewline
\rCarriage return
\tTab
\\Backslash
\.Literal period