Send us translation corrections, feature suggestions and bug reports.Contact: toolsintab@gmail.com

Regular expression tester

Test JavaScript regular expressions with highlighted matches, capture groups and optional replacement. Files and entered content are not sent to or stored on a server.

How to use

Test JavaScript regular expressions with highlighted matches, capture groups and optional replacement.

Supported formats & limits

Values → Result

Processing stays in this browser. File formats and available memory may limit the result.

Without g, only the first match is returned. Match positions are JavaScript zero-based UTF-16 offsets.

Regular expression tester User guide

Instructions

  1. Use the visible syntax reference to enter an expression without / delimiters and choose flags.
  2. Enter test text and optionally a replacement using $1 / $&.
  3. Run the test and inspect highlights, positions, groups and replaced text.

Example

Input / settings

(\d+) · g · A12 B34

Result / checks

12, 34 with group 1

Without g, only the first match is returned. Match positions are JavaScript zero-based UTF-16 offsets.

Please note

  • Without g, only the first match is returned. Match positions are JavaScript zero-based UTF-16 offsets.
  • A separate worker is stopped after one second. Up to 2,000 matches and 200,000 input characters.