Forum Discussion
1 Reply
Sort By
- JHuntCommunity Hero
Hi,
Here's a Groovy example of how to get the value for multiple matches:
assert ('abc1 def2 abc5 def6' =~ /abc(\d)/).findAll() == [['abc1', '1'], ['abc5','5']]
I try to match same regex multiple times on same SOAP response, it contains <ns12:AmountID> tag multiple times.
String numberToGet = reger.getNthMatch(/<ns12:AmountID>(\d+)<\/ns12:AmountID>/, 0);
How could I differ output values?
Hi,
Here's a Groovy example of how to get the value for multiple matches:
assert ('abc1 def2 abc5 def6' =~ /abc(\d)/).findAll() == [['abc1', '1'], ['abc5','5']]