The macro searches the value of the specified property using the specified regular expression and replaces matches with the replacement value specified.
The following table describes the macro specific attributes for the macro:
| Macro Specific Attributes | ||
| Attribute | Description | Required |
| flags |
An optional string that contains any combination of the following characters:
|
No |
| property | The name of the property whose value is to be searched and altered. | Yes |
| regex | A string that specifies the pattern of the regular expression. | Yes |
| value | The replacement value. | Yes |
None
<ReplaceRegex
property="propertyName"
regex="o."
value="@@@@"
/>
Result:
Before: The quick brown fox jumps over the lazy dog
After: The quick br@@@@n fox jumps over the lazy dog
<ReplaceRegex
property="propertyName"
regex="o."
flags="g"
value="@@@@"
/>
Result:
Before: The quick brown fox jumps over the lazy dog
After: The quick br@@@@n f@@@@ jumps @@@@er the lazy d@@@@