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
- Enter a JavaScript pattern and supported flags.
- Paste a test string.
- Review matched spans, captures, and indexes.
Input and output examples
Example 1
Input
Pattern: \b[A-Z]{2}\d{2}\b
Text: ID: AB42, CD7Output
AB42 · index 4Example 2
Input
Pattern: ([a-z]+)@(example\.com)
Text: dev@example.comOutput
dev@example.com · group 1: dev · group 2: example.comFrequently 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.