DevDesk

DEVDESK / GUIDE

Regex Tester — Usage guide

Test JavaScript regular-expression patterns and flags, then inspect matches, capture groups, and string positions.

How to use it

  1. Enter a JavaScript pattern and supported flags.
  2. Paste a test string.
  3. Review matched spans, captures, and indexes.

Input and output examples

Example 1

Input

Pattern: \b[A-Z]{2}\d{2}\b
Text: ID: AB42, CD7

Output

AB42 · index 4

Example 2

Input

Pattern: ([a-z]+)@(example\.com)
Text: dev@example.com

Output

dev@example.com · group 1: dev · group 2: example.com

Frequently asked questions

Does it support PCRE or Python syntax?

No. It uses browser JavaScript RegExp syntax and the supported JavaScript flags.

Can a complex pattern freeze the tab?

Matching runs in a Web Worker. If it exceeds the time limit, the worker is terminated so the interface can recover.

Can global zero-length matches loop forever?

No. The global matcher advances its index after a zero-length match to prevent an infinite loop.