Skip to content

Replace Value with Regex

This operation substitutes text within the given input using a regular expression pattern.

POST /api/v1/Utility/ReplaceValueWithRegex
NameTypeRequiredDefaultDescription
TextstringYes-The text value to process
RegexstringYes-The regex pattern to find matches
ReplacementTextstringYes-The text to replace matches with
TrimResultbooleanNotrueWhether to trim whitespace from the result

A string containing the processed text with replacements applied.

The operation uses .NET’s regular expression engine to find all occurrences of the specified pattern in the input text and replaces them with the provided replacement text.

  • The regex pattern follows .NET’s regular expression syntax
  • You can use capture groups in the regex and reference them in the replacement text with $1, $2, etc.
  • This operation is useful for text normalization, content sanitization, or format conversion

Credit Cost

Cost: 0.05 credit(s) per call

Note: Fixed cost per call regardless of input size