Test and debug regular expressions in real-time. Enter a regex pattern and test text to see matches highlighted instantly. Supports JavaScript regex syntax with flags. Use the quick reference and common patterns for help.
\dDigit (0-9)\wWord character (a-z, A-Z, 0-9, _)\sWhitespace.Any character[abc]Any of a, b, or c[^abc]Not a, b, or c*0 or more+1 or more?0 or 1{n}Exactly n times{n,}n or more times{n,m}Between n and m times^Start of string$End of string\bWord boundary()Capture group(?:)Non-capture group|OR operatorAt least 8 characters
^.{8,}$1 uppercase, 1 lowercase, 1 number
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$Upper, lower, number, special char
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&]).{8,}$No spaces, 8-32 chars
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[^\s]{8,32}$Works for 95% of real-world use
^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$International phone format
^\+?[1-9]\d{1,14}$Vietnam phone numbers
^(0|\+84)(3|5|7|8|9)\d{8}$HTTP/HTTPS URLs
^(https?:\/\/)([\w\-]+\.)+[\w\-]+(\/[\w\-._~:/?#\[\]@!$&'()*+,;=]*)?$Domain name validation
^([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$Letters, numbers, underscore
^[a-zA-Z0-9_]{3,20}$Letters first, then alphanumeric
^[a-zA-Z][a-zA-Z0-9_]{2,19}$Positive/negative integers
^-?\d+$Decimal numbers
^-?\d+(\.\d+)?$Positive numbers only
^\d+(\.\d+)?$UUID version 4
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$6-12 character code
^[A-Za-z0-9]{6,12}$ISO date format
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$24-hour time
^([01]\d|2[0-3]):[0-5]\d$Only letters, numbers, spaces
^[a-zA-Z0-9\s]+$No spaces allowed
^\S+$Leading/trailing spaces
^\s+|\s+$