Regex Tester

Test and debug regular expressions with real-time matching

Regular Expression

Enter your regex pattern

g - global (find all matches)

i - case insensitive

m - multiline

s - dotAll (. matches newlines)

u - unicode

y - sticky

Test String

Enter text to test against

Quick Patterns

Common regex patterns

Examples

Click to load example patterns

Common Patterns

\dAny digit (0-9)\wWord character\sWhitespace.Any character*0 or more+1 or more?0 or 1{n}Exactly n times

Character Classes

[abc]a, b, or c[^abc]Not a, b, or c[a-z]a through z^Start of line$End of line\bWord boundary|OR operator(...)Capture group