{"slug":"regex-openverbs-com-v1-replace-5b5f59","title":"Replace matches of a RE2 pattern with a replacement string","host":"regex.openverbs.com","method":"POST","resource":"https://regex.openverbs.com/v1/replace","category":"code","description":"Replace matches of a RE2 pattern with a replacement string. Replaces all matches by default (set all=false for first-only). The replacement may reference capture groups with $1, $2 or ${name}. Returns the resulting string.","price_listed":0.004,"price_asked":0.004,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":468,"reported_calls_30d":3,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"all":false,"flags":"example","input":"example","pattern":"example","replacement":"example"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"all":{"description":"Replace every match. Default true.","type":"boolean"},"flags":{"description":"Any of i (case-insensitive), m (multiline ^$), s (dotall). Default none.","maxLength":8,"type":"string"},"input":{"description":"The subject text.","maxLength":1000000,"type":"string"},"pattern":{"description":"RE2 regular-expression pattern.","maxLength":4096,"minLength":1,"type":"string"},"replacement":{"description":"Replacement text; supports $1/${name} group references.","maxLength":1000000,"type":"string"}},"required":["pattern","input","replacement"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":468,"error":null}],"description_full":"Replace matches of a RE2 pattern with a replacement string. Replaces all matches by default (set all=false for first-only). The replacement may reference capture groups with $1, $2 or ${name}. Returns the resulting string.","last_updated":"2026-09-06T08:13:00.915Z","schemes":["exact"]}