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.
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.comHow to use it
- Enter a JavaScript pattern and supported flags.
- Paste a test string.
- 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.