@Override
public JMeterProperty transformValue(JMeterProperty prop) throws InvalidVariableException {
PatternMatcher pm = JMeterUtils.getMatcher();
Pattern pattern = null;
PatternCompiler compiler = new Perl5Compiler();
String input = prop.getStringValue();
if(input == null) {
return prop;
}
for(Entry<String, String> entry : getVariables().entrySet()){
String key = entry.getKey();
String value = entry.getValue();
if (regexMatch) {
try {
pattern = compiler.compile("\\b("+value+")\\b");
input = Util.substitute(pm, pattern,
new StringSubstitution(FUNCTION_REF_PREFIX + key + FUNCTION_REF_SUFFIX),
input, Util.SUBSTITUTE_ALL);
} catch (MalformedPatternException e) {
log.warn("Malformed pattern " + value);