- Home
- Text Tools
- Regex Tester
Regex Tester
Test, debug, and understand regular expressions with real-time matching and visual feedback
Enter a pattern and test string to see results
Options
Find all matches
Ignore case
^ and $ match line breaks
. matches newlines
Enable Unicode support
Matches from lastIndex
Test your regex pattern against the input text. Matches will be highlighted and detailed information provided.
Regex Reference
.
Any character except newline\d
Digit (0-9)\D
Not a digit\w
Word character (a-z, A-Z, 0-9, _)\W
Not a word character\s
Whitespace (space, tab, newline)\S
Not whitespace^
Start of stringClick expand to see all 22 patterns
Test History
No history yet. Start testing regex patterns to see them here.
Features
Real-time Testing
See matches instantly as you type with visual highlighting
Multiple Modes
Test matching, replacing, and splitting with the same pattern
Pattern Library
Common regex patterns for emails, URLs, phones, and more
Code Generation
Generate code snippets for JavaScript, Python, Java, and PHP
Test History
Keep track of your recent tests and reload them instantly
Cheat Sheet
Quick reference for regex syntax and special characters
How to Use
- Enter your regex pattern in the pattern field
- Add test text to match against
- Configure flags and options as needed
- See real-time results with highlighted matches
- Switch between match, replace, and split modes
- Generate code snippets for your programming language
Common Use Cases
- Email Validation: Test email patterns before using in forms
- Data Extraction: Extract specific patterns from logs or text
- String Manipulation: Replace or split text based on patterns
- Input Validation: Validate phone numbers, URLs, dates
- Code Refactoring: Find and replace code patterns
Regex Flags Explained
- g (Global): Find all matches, not just the first
- i (Case Insensitive): Match regardless of case
- m (Multiline): ^ and $ match line breaks
- s (Dot All): . matches newline characters
- u (Unicode): Enable full Unicode support
- y (Sticky): Match from the last index position