🔍 Regex Tester

Test regular expressions with live highlighting and match details

Matches: 0

Test Text

Highlighted Matches

Match Details

No matches found. Try entering a pattern and test text.

Frequently Asked Questions

What regex flags are supported?

The tool supports four common flags: g (global - find all matches), i (case-insensitive matching), m (multiline - ^ and $ match line boundaries), and s (dotAll - . matches newlines). Combine flags for complex pattern matching.

How do I read the match details?

Match details show each match with its text content, position (start-end index), and any captured groups. This helps debug complex patterns and understand exactly what your regex is matching. Matches are also highlighted in yellow in the preview.

What happens if my regex is invalid?

Invalid regex patterns display a red error message explaining what's wrong. Common errors include unclosed brackets, invalid escape sequences, or unbalanced parentheses. Fix the error to see matches again.

Can I test multiline patterns?

Yes! Enable the 'm' (multiline) flag to make ^ and $ match the start/end of lines instead of the entire string. Enable the 's' (dotAll) flag to make . match newline characters. These are essential for processing multi-line text.