Invalid endpoint error on regular expression
| From: | Seth Rothberg | Date: | Fri, 10 Nov 2000 15:29:25 +0000 |
| Subject: | Invalid endpoint error on regular expression | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24659@lists.php.net to get a copy of this message | ||
Hello all,
Using php 3.x, I'm trying to build a regular expression with data gathered from
a submitted form.
The code is in early days. Here it is:
$dateMask = "$startMonth_[$startDay-$endDay]_$startYear";
$dateMask will be a string that looks something like this:
11_[12-18]_2000
Yet when I try to use $dateMask as a pattern for ereg:
if(ereg($dateMask, $file)) $calendar[] = $file;
I get a warning message that I've got an invalid endpoint in the range. Looks
like a valid range to me. What am I missing?
Thanks,
Seth