Regex Tester
Test regular expressions in real-time
g Global
i Case insensitive
m Multiline
Test String
Match Result
About This Regex Tester
A Regular Expression (Regex) defines a search pattern for strings. It is used for string searching, input validation, and text replacement. Test your regex patterns in real-time with this tool.
What are some common regex patterns?
Email: ^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$ / URL: ^https?:\/\/[\w.-]+(:[0-9]+)?(\/.*)?$ / Numbers only: ^[0-9]+$ / Alphanumeric: ^[a-zA-Z0-9]+$ / Date (YYYY-MM-DD): ^\d{4}-\d{2}-\d{2}$
What are regex flags (g, i, m)?
g (global): Find all matches in the string. i (case-insensitive): Match regardless of case. m (multiline): ^ and $ match the start/end of each line. Multiple flags can be combined (e.g., gi).
Where are regular expressions used?
Regex is used for email/phone/URL validation, log file analysis, text editor find-and-replace, string processing in programming languages, and data extraction in web scraping.
What are some common regex patterns?
Email: ^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$ / URL: ^https?:\/\/[\w.-]+(:[0-9]+)?(\/.*)?$ / Numbers only: ^[0-9]+$ / Alphanumeric: ^[a-zA-Z0-9]+$ / Date (YYYY-MM-DD): ^\d{4}-\d{2}-\d{2}$
What are regex flags (g, i, m)?
g (global): Find all matches in the string. i (case-insensitive): Match regardless of case. m (multiline): ^ and $ match the start/end of each line. Multiple flags can be combined (e.g., gi).
Where are regular expressions used?
Regex is used for email/phone/URL validation, log file analysis, text editor find-and-replace, string processing in programming languages, and data extraction in web scraping.