The Replace String API endpoint allows you to easily search for a specific word or phrase within a given text and replace it with a different word or phrase. This can be useful for editing text or data transformation.
Endpoint Information
Method: POST
Endpoint URL: https://node.nodetrigger.com/api/replace-string
Content Type: application/json
Example Requests
{
"string": "Hello World, welcome to the programming world.",
"find": "world",
"replace": "universe"
}
This example will replace all occurrences of the word “world” with “universe”, resulting in the following output:
{
"result": "Hello World, welcome to the programming universe."
}
Notes
- All inputs must be strings. If any of the parameters ‘string’, ‘find’, or ‘replace’ is not a string, an error will be returned.
- The search is case-sensitive. Ensure you provide the correct case for the word you want to find.
- This endpoint will replace all occurrences of the word or phrase you specify.
“`