in reply to Regex: return the pattern instead of the actual match
if ($_ =~ m/($regex)/ && $regex =~ /(.*)/s) { ... Now $1 will contain $regex ... } [download]