Follow the steps below to search for a pattern and replace it with other characters:
From within the Project Designer page, expand the File System folder in the Component Library, and then drag the Search and Replace task to the Project Outline.
On the Basic tab of the Search and Replace task, specify values for the following attributes:
The file path of the output file where the modified data should be written. This is only applicable when modifying a single file.
Search For
The string (pattern) to search for within the input file(s). All values will be searched for as their string literals. Regular expressions are not allowed. The backslash character '\' is an escape character that can be used to search for special characters. Below is a list of escape sequences that are permitted.
\n - New line.
\r - Carriage return.
\t - Tab.
\\ - Represents a single \.
\xFF - A hex value. Replace FF with a valid 2-byte hex value.
\u0000 - A Unicode value. Replace 0000 with a valid Unicode value.
Replace With
The replacement string to be written in place of the
Search For
match. In order to simply delete the
Search For
characters, use the ${system.emptyString} variable as the Replace With value. Escape sequences are permitted. For a list of valid escape sequences please refer to the list above under the
Search For
attribute.
Click the
Save
button when finished.
You may only want to replace the pattern a predetermined number of times. The
Max Number of Replacements
attribute on the Advanced tab controls how many times the value will be replaced.