SagarSingh
11 years agoNew Contributor
Regex in Groovy Scripting of SoapUI
Hi Team
Im an trying to write regular expression for a tag "<keyboard>Qwerty~12-qwerty</keyboard>", i need to write regex to find the entire tag not just the tag name or its contents, instead regex for complete "<keyboard>Qwerty~12-qwerty</keyboard>" and replace it. Tried various ways from Google but it shows either symbols like / and * are not allowed in Groovying scripting inside SoapUI
def request4 = request2.replace(<keyboard>*</keyboard>', "")
def request4 = request2.replace(\<conversationId\>\*\<\/conversationId\>', "")
Can you help me to find a way to resolve it.
Im an trying to write regular expression for a tag "<keyboard>Qwerty~12-qwerty</keyboard>", i need to write regex to find the entire tag not just the tag name or its contents, instead regex for complete "<keyboard>Qwerty~12-qwerty</keyboard>" and replace it. Tried various ways from Google but it shows either symbols like / and * are not allowed in Groovying scripting inside SoapUI
def request4 = request2.replace(<keyboard>*</keyboard>', "")
def request4 = request2.replace(\<conversationId\>\*\<\/conversationId\>', "")
Can you help me to find a way to resolve it.