Text & Regex

Regex Tester

Test a regular expression against your own sample text and see every match highlighted, with capture groups and clear explanations when a pattern is invalid. Everything runs in your browser — your text never leaves the page.

Runs in your browser v1.0.0

Regular expression

JavaScript RegExp
Flags

Matches are found globally. Use (…) to capture groups, (?<name>…) for named groups, and the flags above to change how the pattern is interpreted.

Sample text

editable

Highlighted matches

0 matches

Match details

capture groups

How it works

The pattern is compiled with the browser’s own RegExp engine and run against your text locally. Invalid patterns are reported with the engine’s reason and a short hint instead of failing silently. A few handy tokens: . any character, \d digit, \w word character, * + ? quantifiers, [abc] character class, ^ $ line anchors, (…) capture group.

Practical uses

Test a regular expression against your own sample text with highlighted matches and capture groups.

Common ways to use it

  • Debug a pattern against real log lines or sample data.
  • Inspect capture groups before using a pattern in code.

Things to keep in mind

  • Uses JavaScript regular-expression syntax; patterns from other languages may need translation.