This REST API allows you to replace text in a document. The API replaces all occurrences of a specified string with another string. If a captured or replacement string contains one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote, the API returns HTTP 400 error response.
The request parameters are the following:
|OldValue||string||Old text value (or regex pattern (see "IsOldValueRegex")) to replace.|
|NewValue||string||New text value to replace by.|
|IsMatchCase||bool||Flag, true means the search is case-sensitive; false means the search is not case-sensitive. Not used if "IsOldValueRegex" is set.|
|IsMatchWholeWord||bool||The flag means that only whole word matched are replaced. Not used if "IsOldValueRegex" is set.|
|IsOldValueRegex||bool||The flag means that "OldValue" contains regex expression.|
Moreover, resource properties are the following:
|Matches||integer||Returns the number of matches.|
Swagger UI lets you call this REST API directly from the browser.
Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of Aspose.Words Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.