in reply to $1 and regex
while(<>){ print if m!(\d+)\D*to\D*(\d+)!i; print "$1\n"; print "$2\n"; } [download]
---- NaSe :x