Skip to main content
ToolstikToolstik

Regex Tester

Processed in your browser

Test JavaScript regular expressions with live match highlighting, capture groups, and flags.

What this tool does

Test JavaScript regular expressions with live match highlighting, capture groups, and flags.

Features

  • Match highlighting
  • Capture and named groups
  • Flag toggles
  • Match count
  • Backtracking timeout

How to test a regular expression

  1. Enter a pattern without slashes, for example \d{3}-\d{4}.
  2. Toggle flags such as Global (g) or Ignore case (i).
  3. Paste test text and click Test regex.
  4. Review highlighted matches and the capture-group table.

Example: find phone numbers

Input
Pattern \d{3}-\d{4} with flag g Text: Call 555-0142 or 555-0199
Result
2 matches: 555-0142, 555-0199

Common uses

  • Build validation patterns for forms (emails, phone numbers, postcodes).
  • Extract values from logs before writing a script.
  • Debug search-and-replace patterns for your editor.

Supported formats

  • JavaScript (ECMAScript) regex syntax

Limits

  • 100,000 characters of test text
  • First 1,000 matches

Limitations

  • PCRE-only features (possessive quantifiers, recursion) are not available.
  • Patterns that run longer than 2 seconds are stopped.

Privacy

Matching runs in a background worker in your browser; text is not uploaded.

Frequently asked questions

Related guides

Browse the free developer toolkit for every related tool and guide.