Regex Tester

Test JavaScript regular expressions in real-time. Find matches, capture groups, and validate your patterns instantly.

Regular Expression
/
/
Test String
Match Results 0 matches

How to use the Regex Tester

This tool allows you to write a regular expression (regex) and immediately test it against a sample string of text. The engine runs locally in your browser using standard JavaScript regex behavior.

  • Pattern: Type your regex between the forward slashes.
  • Flags: Add modifiers like g (global), i (case-insensitive), or m (multiline) after the closing slash.
  • Matches: Matches are highlighted in the text area and detailed in the result list below, including any capture groups.

Common Regex Flags

Without the g flag, the regex will stop at the first match it finds. With g, it will find all matches in the text.

Makes the pattern match regardless of uppercase or lowercase letters. /a/i will match both "a" and "A".

Changes the behavior of ^ and $ to match the start and end of any line within the text, rather than just the start and end of the entire string.

regexregular expressiondevelopervalidation