Friday, May 9, 2014

Extract value from string in groovy

def f = new File("strings.xml")
def m = (f.text =~ "myAttribute\">(.*)<.*")
println m[0][1]

No comments:

Post a Comment