This rule checks the input value for a specific pattern. If the pattern is found, it is replaced by a new pattern. This rule only replaces the first instance it finds of the pattern. The syntax for replace is:
<replace regex="regex_pattern" replacement="regex_pattern"/> |
The parameters for replace are:
regex – A regular expression that, if found in the input string, is converted to the replacement expression.
replacement – The regular expression that replaces the expression specified by the regex parameter.
The following sample tries to match the input value against “ST.”. If a match is found, the standardization engine replaces the value with “SAINT”.
<replace regex="ST\." replacement="SAINT"/> |