Regex Tester

Test JavaScript regular expressions with match highlighting and capture group extraction.

Matches
Groups
/
/
Flags

Ways to use Regex Tester

Test a JavaScript pattern against real text

Try a regular expression, inspect every match and capture group, and move structured captures into another tool.

Develop a JavaScript pattern

Edit a pattern and flags while seeing which parts of the test text match.

Inspect capture groups

Review each match, its index, and named or numbered captures in a table.

Prepare captured data

Send captures to JSON Wizard or CSV / JSON Converter, or copy all full matches as separate lines.

How to use it

  1. Enter a JavaScript regular-expression pattern without the surrounding slashes.
  2. Choose flags and paste the text you want to test.
  3. Navigate highlighted matches, then inspect, copy, or convert the results.

Understand the result

Flags
Use g, i, m, s, u, or y to control global, case-insensitive, multiline, dot-all, Unicode, or sticky matching.
Match navigation
The counter and arrow controls move through highlighted matches in source order.
Capture groups
The match table shows full matches, indices, and named or numbered captured values.
Pattern guards
Invalid syntax, detected nested quantifiers, and patterns that match empty strings are rejected with an inline error.

Example

Pattern and text

(?<label>[A-Za-z]+) · alpha 42 beta

g flag

2 matches · label: alpha · label: beta

Good to know

  • Patterns use JavaScript regular-expression syntax, which can differ from another language or service.
  • Use the g flag when you want every match rather than only the first one.
  • The pattern guards reduce specific risks but do not provide a general execution-time guarantee.