thanx a million!! you really saved my day!! :o)

hwee

----- Original Message ----- 
From: "John Holmes" <[EMAIL PROTECTED]>
To: "Ng Hwee Hwee" <[EMAIL PROTECTED]>
Cc: "PHP DB List" <[EMAIL PROTECTED]>
Sent: Thursday, August 05, 2004 11:05 AM
Subject: Re: [PHP-DB] Regular Expression


> Ng Hwee Hwee wrote:
>  >>(sin|hkg|bkk|jkt)x[0-9]{4}-[0-9]{3}-[0-9]{2}
>  >
> > thanx!!! it worked like a charm! =)
> >
> > just a question, i've tried adding a ^ to the front of your expressions
and
> > a $ to the end of your expression and it still worked.. but is it
> > recommended? why didn't you use them?
> >
> > ^(sin|hkg|bkk|jkt)x[0-9]{4}-[0-9]{3}-[0-9]{2}$
>
> Yeah, you should use them to ensure that the text is _only_ that code
> and not just contains it. Otherwise "asdf sinx1234-123-12 asdf" will
> pass. I just forgot. :)
>
> -- 
>
> John Holmes
>
> php|architect - The magazine for PHP professionals -
http://www.phparch.com
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to