Help for this page

Select Code to Download


  1. or download this
    use constant REGEX => qr/^(\d{4})-(\d{2})-(\d{2})/;
    while (<>) {
      chomp;
      printf "$_:  match=%s\n", ($_ =~ m{(??{REGEX})} ? 1 : 0);
    }