Re: regular expression question

From: Date: Fri, 31 Aug 2007 18:32:19 +0000
Subject: Re: regular expression question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261566@lists.php.net to get a copy of this message
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. /Per Jessen, Zürich

« previous php.general (#261566) next »