Free Online Regular Expression Tester
Quick Tips
- • This tool runs entirely in your browser - your data stays private.
- • Press Ctrl+V (Cmd+V on Mac) to quickly paste text.
- • Use the Copy button to save your result to clipboard.
- • Bookmark this page for quick access!
Test and debug regular expressions with live matching.
Examples
Pattern: \d+ Text: Order 12345 shipped
Match: 12345
Pattern: [a-z]+@[a-z]+\.[a-z]+ Text: contact@example.com
Match: contact@example.com
Pattern: ^Hello Text: Hello World
Match: Hello
Pattern: (\w+)@(\w+) Text: user@domain
Groups: user, domain
Frequently Asked Questions
Nearly all modern programming languages support regex including JavaScript, Python, Java, C#, PHP, Ruby, Go, and Perl. The syntax is largely similar across languages with some minor variations in features and escaping rules.
The global flag makes the regex engine find all matches in the text rather than stopping after the first match. Without it, only the first occurrence is matched.
Escape special characters with a backslash. To match a literal dot, use \. instead of just . which matches any character. Other special characters needing escaping include: * + ? [ ] ( ) { } ^ $ | \
The * quantifier matches zero or more occurrences (including no matches), while + requires at least one occurrence. For example, \d* matches empty strings, but \d+ requires at least one digit.
Yes, enable the multiline (m) flag to make ^ and $ match the start and end of each line, not just the entire string. The dotall (s) flag makes . match newlines for patterns spanning multiple lines.
Absolutely. All regex testing occurs locally in your browser. Your patterns and test text are never transmitted to any server, ensuring complete privacy for sensitive content.
Related Tools
Related Articles
Mastering Find and Replace in Text
Learn powerful find and replace techniques including regex for efficient text editing.
Read moreRegular Expressions Guide for Beginners
Learn the basics of regular expressions (regex) for powerful text pattern matching.
Read moreHow to Extract Email Addresses from Text
Learn multiple methods to extract email addresses from documents, web pages, and text files.
Read more