Test and debug regular expressions
Regular expressions (regex) are patterns used to match character combinations in strings. They are powerful tools for searching, extracting, and validating text. However, writing correct regex can be challenging, especially for complex patterns. This tool helps you test and debug your regular expressions in real time.
Enter your regex pattern, choose flags, and paste test text to see matches highlighted. The tool also shows match counts, capture groups, and detailed information about each match.
All processing is done locally in your browser – your data never leaves your device.
Step 1: Enter your regular expression pattern (without delimiters) in the pattern field.
Step 2: Select regex flags: Global (g), Case Insensitive (i), Multiline (m).
Step 3: Paste or type the text you want to test against.
Step 4: Click "Test Regex" to see matches highlighted and match details.
Step 5: Copy the results using the "Copy Result" button.
The tool supports JavaScript regex syntax, including capture groups, character classes, quantifiers, and lookaheads.
Email regex: \b[\w.-]+@[\w.-]+\.\w+\b
Phone number: \d{3}[-.]?\d{3}[-.]?\d{4}
URL: https?://[^\s]+