|
,
\\
Assuming all above the relevant __groovy()
function syntax would be:
${__groovy(vars.get('TemplateID1').replaceAll('\\\|'\,'\,'),)}
Also be aware that there is a __strReplace() function which can also do what you need, in this case the syntax would be:
${__strReplace(${TemplateID1},\\|,\,,)}
If you don't have this function it can be installed as a part of " Custom JMeter Functions" bundle using JMeter Plugins Manager
replaceAll accepts a regex. you need to escape the pipe char.
replaceAll("\\|", ",")
I tested this in plain groovy and it works. not sure about jmeter integration.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.