Matches will be highlighted here
Test and debug regular expressions in real-time with this free online regex tester. Features instant match highlighting, capture group display, and support for all JavaScript regex flags. All processing happens in your browser — your data never leaves your device.
Regular expressions (regex) are patterns used to match character combinations in strings. They're incredibly powerful for searching, validating, and manipulating text. Regex is supported in virtually every programming language and is essential for tasks like form validation, log parsing, data extraction, and search-and-replace operations.
g Global — Match all occurrences, not just the firsti Case Insensitive — Match regardless of letter casem Multiline — ^ and $ match start/end of each line, not just the strings Dot All — Make . match newline characters toou Unicode — Enable full Unicode supporty Sticky — Match only from the lastIndex position^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ — Email address^https?:\/\/[^\s]+$ — URL^\d{4}-\d{2}-\d{2}$ — Date (YYYY-MM-DD)^(?=.*[A-Z])(?=.*[a-z])(?=.*\d).{8,}$ — Strong password^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$ — IPv4 address\b\d{3}-\d{3}-\d{4}\b — US phone number^ and $ ensure full string matching for validation. * + ? [ ] ( ) { } | \ ^ need backslash escaping\d is better than . when matching digits(?:...) groups without creating a capture(?<name>...) makes patterns more readable(a+)+ can cause exponential time complexityMore DevDen tools: JSON Formatter · Base64 Encoder/Decoder · Unix Timestamp Converter · URL Encoder/Decoder