Highlight matches live, inspect capture groups and test replacements
—Nested quantifiers like (a+)+ can backtrack catastrophically on long non-matching input. Matches here run in a Web Worker with a timeout, so the UI stays responsive.
g finds every match instead of the first; i ignores case; m makes ^ and $ match line boundaries rather than only the whole string.