Replace
2 min
Replaces all the occurrence of a text in a given input text with a provided replacement text
Property | Description |
|---|---|
oldString | This is the search pattern and can be an alphanumeric text or a valid regex expression. Set the regex parameter to "yes" if this contains the search pattern in regular expression format |
newString | The exact replacement value if the search pattern is found |
regex | set "yes" if the oldString contains a valid regular expression pattern |
API Definition
Replace API
Call the following API to replace values with replacement text
POST
https://orca.pathfix.com/functions/text/replace
{
"input": "We need to completely replace our old furniture",
"oldString": "completely",
"newString": "totally"
}API Definition
Replace API with Regex Search Pattern
Call the following API to replace values with replacement text
POST
https://orca.pathfix.com/functions/text/replace
{
"input": "We need to completely replace our old furniture ex-30293",
"oldString": "ex-\\d+",
"newString": "",
"regex":"yes"
}