Regex test / match / extract / replace (safe)
regexSafely run regular expressions against text with catastrophic-backtracking protection; supports test, match, extract, and replace operations.
Instructions
FREE. Run a regular expression against input with catastrophic-backtracking protection (it runs in a killable worker with a hard timeout, so a pathological pattern returns a 400 instead of hanging). op is test|match|extract|replace. Args: pattern, input, flags (gimsuy), op, replacement (for replace).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | test | match | extract (capture groups) | replace. Default match. | |
| flags | No | Any of g,i,m,s,u,y. | |
| input | Yes | The text to run it against (max 200k chars). | |
| limit | No | Max matches for global ops (default 1000). | |
| pattern | Yes | The regular expression source (max 2000 chars). | |
| replacement | No | Replacement string for op='replace' (supports $1 etc.). |