/^Current time =>\s(\d\d\d\d)(\d\d)(\d\d)\S(\d\d)(\d\d)(\d\d)/sx ; #### >perl -wMstrict -le "my $s = 'Current time => 123'; print 'match 1' if $s =~ /Current time => 123/x; ;; print 'match 2' if $s =~ /Current [ ] time \s => \s+ 123/x; " match 2