Regex Replace
Synopsis
A text processing processor that finds and replaces text patterns using regular expressions, providing powerful pattern-based text transformation capabilities for data cleaning, formatting, and normalization.
Schema
- regex_replace:
field: <ident>
regex: <string>
replacement: <string>
target_field: <ident>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Field containing the text to process |
regex | Y | - | Regular expression pattern to match |
replacement | Y | - | Replacement text or pattern |
target_field | N | field | Field to store the modified text |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue if regex processing fails |
ignore_missing | N | false | Continue if source field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |