Re: [PHP] Using a perl regex

2004-02-11 Thread Michal Migurski
>I am trying to use a perl regular expression to validate a form field >where I am allowing someone to edit a sql date-time stamp in the format >of '2004-02-05 21:43:34'. Just FYI, strtotime() provides date/time validation for free - check the input using strtotime() and date('Y-m-d H:i:s') to get

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
Thanks Kelly (and Richard), That did the job :) Salut, Verdon On 2/11/04 12:22 PM, "Kelly Hallman" <[EMAIL PROTECTED]> wrote: > On Wed, 11 Feb 2004, Verdon Vaillancourt wrote: >> I thought I might have tried that and just did again. >> >> I receive the error; Warning : Delimiter must not be

Re: [PHP] Using a perl regex

2004-02-11 Thread Kelly Hallman
On Wed, 11 Feb 2004, Verdon Vaillancourt wrote: > 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 > > I'm not sure if this means I have to escape something in

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
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 I'm not sure if this means I have to escape something in the pattern, but will look further. Cheers, Verdon On 2/1

Re: [PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
I should have prefaced my subject with NEWBIE :) Thanks, I'll give it a try. Best regards, verdon On 2/11/04 12:12 PM, "Richard Davey" <[EMAIL PROTECTED]> wrote: > Hello Verdon, > > Wednesday, February 11, 2004, 5:09:22 PM, you wrote: > > VV> I am trying to use a perl regular expression to v

Re: [PHP] Using a perl regex

2004-02-11 Thread Richard Davey
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

[PHP] Using a perl regex

2004-02-11 Thread Verdon Vaillancourt
Hi, I am trying to use a perl regular expression to validate a form field where I am allowing someone to edit a sql date-time stamp in the format of '2004-02-05 21:43:34'. I have found a pattern that works (at http://www.regexplib.com/RETester.aspx?regexp_id=93) which is; 20\d{2}(-|\/)((0[1-9])|