Re: [PHP] Re: PHP regular expression

2004-03-11 Thread Michal Migurski
>>> preg_match("/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+[a-zA-Z0-9_-]$/",$email); >> >> The / characters are the regex delimiters. This is a throwback to the >> Perl language. Basically, the / show where the beginning and end of the >> regex is. You *MUST* have them. Aft

Re: [PHP] Re: PHP regular expression

2004-03-11 Thread Jason Davidson
I think he meant.. the carrot after the delimiter which means NOT.. like /[^a]/ means match anything thats not an 'a' Jason Justin Patrin <[EMAIL PROTECTED]> wrote: > > Mike Mapsnac wrote: > > > Hello > > > > I found this function online and want to understand how it works. > > I don't under

[PHP] Re: PHP regular expression

2004-03-11 Thread Justin Patrin
Mike Mapsnac wrote: Hello I found this function online and want to understand how it works. I don't understand "/^" and "$/". I know that "^" beginning of the string but what is "/^". Thanks function validEmail($email) { return preg_match("/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+