Example input/output
Input: Pattern: (a+)+ / Test string: aaaaaaaaaaaaaaaaaab
Output: 1000 iterations in 45ms (avg: 0.045ms per run)
How it works
This tool runs the provided regex against the test string in a loop for the configured number of iterations, using performance.now() to measure elapsed time. Results are shown as total time and average time per iteration. This helps identify catastrophically backtracking patterns (ReDoS). Processing runs in your browser.
Common use cases
- Benchmark a regex pattern against a large input to detect backtracking issues
- Compare performance of alternative regex patterns
- Identify catastrophic backtracking in complex expressions before deploying