I am trying to set #string into value having the same regex in karate, as following: I have sampleXML:
<Addresses>
<Address Id="AD1">
<StreetNum>0001</StreetNum>
</Address>
<Address Id="BR9">
<StreetNum>0002</StreetNum>
</Address>
...
</Addresses>
From the above xml example, I will set #string into value having the same regex, as following:
* string temp = sampleXML
* xml report = temp.replaceAll('<Address Id="#regex [A-Z0-9]{3}">', '<Address Id="#string">')
But it doesn't work, so please help me if you know that how to set #string into value having the same regex in karate? Thanks!
My expected result as:
<Addresses>
<Address Id="#string">
<StreetNum>0001</StreetNum>
</Address>
<Address Id="#string">
<StreetNum>0002</StreetNum>
</Address>
...
</Addresses>