本地英文版地址: ../en/gsub-processor.html
Gsub Processoredit
Converts a string field by applying a regular expression and a replacement. If the field is an array of string, all members of the array will be converted. If any non-string values are encountered, the processor will throw an exception.
Table 50. Gsub Options
Name | Required | Default | Description |
---|---|---|---|
|
yes |
- |
The field to apply the replacement to |
|
yes |
- |
The pattern to be replaced |
|
yes |
- |
The string to replace the matching patterns with |
|
no |
|
The field to assign the converted value to, by default |
|
no |
|
If |
|
no |
- |
Conditionally execute this processor. |
|
no |
- |
Handle failures for this processor. See Handling Failures in Pipelines. |
|
no |
|
Ignore failures for this processor. See Handling Failures in Pipelines. |
|
no |
- |
An identifier for this processor. Useful for debugging and metrics. |
{ "gsub": { "field": "field1", "pattern": "\.", "replacement": "-" } }