Apply a regex to text and return all matches + capture groups (deterministic; LLMs guess regex wrong). Send { pattern, text, flags? }.