use Regexp::Wordy qw(:all); if ('1998/10/08 [11:10]' =~ regexp( at_bol, clean('1998/10/08'), any_number(space), clean('['), remember( one_or_more( either(':', digit))), nondigit)) { print "Found a match at time $1\n"; }