Trihedralguy has asked for the wisdom of the Perl Monks concerning the following question:
I don't really understand regex no matter how much reading I do, its just very difficult to understand at a glance. I will also be needing to check $dated to see if its blank. So it could either be MM/DD/YYYY or nothing. I'm sure I'm getting close, but no matter what that is always doing the "else statement"if ($dated =~ m/^[0-3][0-9]\/[0-1][0-9]\/[1-2][0-9][0-9][0-9]$/) { } else { #User entered an invaild date. $passfail = 0; $errmsg = 'Unable to use date format. Please use "MM/DD/YYYY" or MM-DD +-YYYY for the Date Delivered Field'; $errtitle = 'Validation Error'; $seconds = 7; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Quick Regex Question
by Herkum (Parson) on May 07, 2007 at 20:22 UTC | |
|
Re: Quick Regex Question
by Not_a_Number (Prior) on May 07, 2007 at 20:57 UTC | |
|
Re: Quick Regex Question
by Corion (Patriarch) on May 07, 2007 at 20:12 UTC | |
by Trihedralguy (Pilgrim) on May 07, 2007 at 20:17 UTC | |
by Corion (Patriarch) on May 07, 2007 at 20:24 UTC | |
by suaveant (Parson) on May 07, 2007 at 20:30 UTC | |
by Trihedralguy (Pilgrim) on May 07, 2007 at 20:47 UTC | |
by suaveant (Parson) on May 07, 2007 at 21:40 UTC | |
|
Re: Quick Regex Question
by Anonymous Monk on May 07, 2007 at 23:19 UTC | |
|
Re: Quick Regex Question
by fenLisesi (Priest) on May 08, 2007 at 09:36 UTC |