$s = '81919-9814US'; print "before = $s\n"; $s =~ /(.*?)<\/Zip>/; print "after = $1\n";