Function controls

Loading

Loading function state...

regex.match

Regex Match

Check whether text matches a regular expression and return matches.

{
  "type": "object",
  "required": [
    "input",
    "pattern"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "pattern": {
      "type": "string"
    },
    "flags": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "rust",
        "js"
      ]
    }
  }
}
regex.replace

Regex Replace

Replace regular expression matches in text.

{
  "type": "object",
  "required": [
    "input",
    "pattern",
    "replacement"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "pattern": {
      "type": "string"
    },
    "flags": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "rust",
        "js"
      ]
    },
    "replacement": {
      "type": "string"
    }
  }
}
regex.split

Regex Split

Split text with a regular expression separator.

{
  "type": "object",
  "required": [
    "input",
    "pattern"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "pattern": {
      "type": "string"
    },
    "flags": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "rust",
        "js"
      ]
    }
  }
}
regex.validate

Regex Validate

Check whether the entire input matches a regular expression.

{
  "type": "object",
  "required": [
    "input",
    "pattern"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "pattern": {
      "type": "string"
    },
    "flags": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "rust",
        "js"
      ]
    }
  }
}
regex.extract

Regex Extract

Extract numbered and named captures from text.

{
  "type": "object",
  "required": [
    "input",
    "pattern"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "pattern": {
      "type": "string"
    },
    "flags": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "rust",
        "js"
      ]
    }
  }
}
regex.replaceMany

Regex Replace Many

Apply multiple regular expression replacement rules in order.

{
  "type": "object",
  "required": [
    "input",
    "rules"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "rust",
        "js"
      ]
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "pattern",
          "replacement"
        ],
        "properties": {
          "pattern": {
            "type": "string"
          },
          "flags": {
            "type": "string"
          },
          "replacement": {
            "type": "string"
          },
          "engine": {
            "type": "string",
            "enum": [
              "rust",
              "js"
            ]
          }
        }
      }
    }
  }
}