DevDesk

TEXT / DEVDESK

Regex Tester

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

Runs regular expressions in a separate Worker and stops after one second. Patterns are limited to 2,000 characters and pattern plus test text to 1 MB. Input stays in this browser.

Test string

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

How to use it

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

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.