Regex tester
Test a JavaScript regular expression safely.
Run a pattern against local text, inspect match indexes and capture groups, and stop patterns that exceed a short execution limit.
Avoid catastrophic backtracking
Nested or ambiguous repetition can make some expressions take exponentially longer on near-matching input. Prefer bounded quantifiers and clear alternatives, then test with representative worst-case strings. Different regex engines can behave differently.