Regex Tester

Test JavaScript regular expressions, flags, match positions, capture groups, and highlighted results.

Status

Valid

Matches

2

Expression

/INV-\d{4}-\d{3}/m

Regular expression

Test a JavaScript regular expression against sample text.

Test text

Highlighted result

Invoice INV-2026-001 was paid on 2026-06-27.
Contact billing@example.com for details.
Invoice INV-2026-002 is pending.

Match list

  1. INV-2026-001at index 8
  2. INV-2026-002at index 94

Related calculators

JavaScript regular expressions

This tester uses the browser JavaScript RegExp engine. Toggle common flags, inspect match positions, and review capture groups before using a pattern in code, validation rules, or search workflows.

Pattern performance

Complex expressions can become slow on large text. Test with realistic sample input and keep patterns as specific as possible before running them on large datasets.