Re: Using a perl regex

From: Date: Wed, 11 Feb 2004 17:17:15 +0000
Subject: Re: Using a perl regex
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-177424@lists.php.net to get a copy of this message
I thought I might have tried that and just did again. I receive the error; Warning : Delimiter must not be alphanumeric or backslash in /server/path/to/functions.php on line xxxx I'm not sure if this means I have to escape something in the pattern, but will look further. Cheers, Verdon On 2/11/04 12:12 PM, "Richard Davey" <rich@launchcode.co.uk> wrote: > Hello Verdon, > > Wednesday, February 11, 2004, 5:09:22 PM, you wrote: > > VV> I am trying to use a perl regular expression to validate a form field > where > > VV> > (!ereg("20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1] > > Surely you should be using preg_match() (i.e. a perl syntax reg exp) ?

« previous php.general (#177424) next »