use strict; use warnings; my $matchDate = qr/(\s*\d+th\s+\w+\s*)/; while () { next unless /$matchDate\s+-\s+$matchDate/; print "Matched: $1 - $2\n"; } __DATA__ 5th April - 12th April