Hi,
def matcher = prev.getResponseHeaders() =~ 'http://abc.com/trip/us/(\\d+)'if (matcher.find()) { new File('id.txt') << matcher.group(1)}