Configure Regular Expressions

This task describes how to configure regular expressions in Service Virtualization. Use regular expressions to match a specific string in order to mask select data.

In the Replace Algorithm Configuration dialog box, you can enter a regular expression in the Match pattern and Replace value fields. (For user interface details, see Replace Algorithm Configuration Dialog Box.)

In addition, when you use regular expressions in the Replace value field, the expression can reference groups from the search pattern you entered in the Match pattern field.


Match pattern field Replace value field Sample input Sample output
\b(\w+)(\s)(\w+)\b $3$2$1 one two two one
\b(?<word1>\w+)(\s)(?<word2>\w+)\b ${word2} ${word1} one two two one

For information on creating regular expressions and some examples of their use, visit this site: Regular Expression Language - Quick Reference.