Regex Tester

Test regular expressions live against custom input. Highlights matches and displays capture groups.

Highlighted Matches

How to use the Regex Tester

  1. Enter your regular expression pattern in the Pattern field.
  2. Enable flags as needed: g finds all matches, i ignores case, m makes ^ and $ match line boundaries.
  3. Paste your test string β€” matches are highlighted in real time and capture groups are shown below.

JavaScript regex syntax quick reference

. matches any character. \d matches a digit, \w a word character, \s whitespace. Use + for one or more, * for zero or more, ? for optional. Wrap groups in (…), alternation in a|b, character classes in […]. Use \b for word boundaries.