Replace Value with Regex
Utility - Replace Value with Regex
Section titled “Utility - Replace Value with Regex”This operation substitutes text within the given input using a regular expression pattern.
Endpoint
Section titled “Endpoint”POST /api/v1/Utility/ReplaceValueWithRegexRequest Parameters
Section titled “Request Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| Text | string | Yes | - | The text value to process |
| Regex | string | Yes | - | The regex pattern to find matches |
| ReplacementText | string | Yes | - | The text to replace matches with |
| TrimResult | boolean | No | true | Whether to trim whitespace from the result |
Response
Section titled “Response”A string containing the processed text with replacements applied.
Implementation Details
Section titled “Implementation Details”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.
Usage Notes
Section titled “Usage Notes”- 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