ToolAssay

Replace matches of a RE2 pattern with a replacement string

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.

Answeringour last check, 2026-09-24
1 of 1checks answered this week
468 msmedian answer time
$0.004listed price per call
$0.004price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

POST https://regex.openverbs.com/v1/replace

CategoryCode and developer
Provider hostregex.openverbs.com
Networkseip155:8453
Payment schemesexact
Self-reported calls, 30 days3 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-09-24 valid payment request 402$0.004 468 ms

Example input (from the provider)

{
  "body": {
    "all": false,
    "flags": "example",
    "input": "example",
    "pattern": "example",
    "replacement": "example"
  },
  "bodyType": "json",
  "method": "POST",
  "type": "http"
}

Promised output schema (from the provider)

{
  "$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"
}

This page as JSON