Re: regular expression question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 11:32 AM 8/31/2007, Per Jessen wrote:
Matthew Lasar wrote:

> But I don't understand why the second half of the regular expression
> works. I'm talking about this part:
>
> @([-a-z0-9]+\.)+[a-z]{2,}/";
>
> why is it able to detect repeated sections of the email address after
> "@" that are separated by periods? like "@email.alaska.com" . It
> looks to me like it's only looking for one example of that pattern.
> Does the "()" allow an unlimited number of patterns to pass?

No, but the following '+' does.

But how? The +[a-z]{2,} seems to allow at least two a-z clusters, but it doesn't include a period. /ml


/Per Jessen, Zürich

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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.13.0/980 - Release Date: 8/30/2007 6:05 PM

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux