With the Search and Replace action node, you have the ability to conduct search and replace operations within a text variable. This allows you to replace a specific portion of text with alternative content. Additionally, you can choose to match the case during replacement or replace only the first occurence of the target text.
The Search and Replace action allows you to replace text values, such as those extracted from an integrated contract analysis tool, before inserting them into a new document generated using a Create Document action.
How to use search and replace in text
- Add the Search and Replace action to your module.
- Select the variable you want to search and replace in. Use the dropdown CHOOSE A TEXT OR TEXT VALUE for this.
- Enter the text you want to replace (if existent) into the SEARCH FOR field. You can also reference variables.
- Input or reference the alternative text into the REPLACE WITH field.
- The Match Case option limits the search to the specific case of the search term. For example, in the string 'Hello, Dave', 'Hello' would match, 'hello' would not.
- The Replace with field is where you enter the term you want to use as the replacement. This can be either an explicit value or a reference.
Known limitations
When it comes to removing and replacing formatting, the process is similar principle to the find and replace feature in Microsoft Word. However, there is a limitation when it comes to structured content.
For example, let us consider a bulleted list that contains multiple items but does not explicitly include the bullet symbol itself (as it can be customized, such as changing to a numbered list).
When using a reference to a bulleted list as a search term, the system may not recognize the bullet symbols. Consequently, attempting to match an entire bulleted list as a search reference may not yield effective results when using this feature.