Ref T13608. Ref T13100. Ref T13586. Properly checking "preg_match()" and similar calls for failure and raising useful exceptions is complicated and error-prone. Provide wrapper functions with an API that's more consistent with the rest of the codebase: matches are returned; and errors raise detailed exceptions.
- Maniphest Tasks
- T13100: PCRE segfaults readily with default "pcre.backtrack_limit" and "pcre.recursion_limit" values
T13586: In Herald transcripts, surface exceptions encountered while evaluating fields
T13608: Remarkup hyperlink pattern may backtrack explosively
- rARC9d5802cb9f08: Provide some "preg_*" wrappers which raise exceptions on failure
See next change.