Regex Tester
Test and debug regular expressions
Regular Expression
//
Valid
Common flags:
gglobaliignore casemmultilinesdotallQuick Examples
Test String
Matches (0)
No matches found
Highlighted Text
Text with matches highlighted will appear here...
Replace
Use $1, $2, etc. for capture groups
Replacement result will appear here...
Regex Cheat Sheet
Character Classes
.Any character\\dDigit\\wWord character\\sWhitespace[abc]Any of a, b, c
Quantifiers
*0 or more+1 or more?0 or 1{n}Exactly n{n,m}Between n and m
Anchors
^Start of string$End of string\\bWord boundary(?=...)Lookahead(?!...)Negative lookahead