NYCPHP Meetup

NYPHP.org

[nycphp-talk] Regex for P Elements

Dan Cech dcech at phpwerx.net
Wed Jan 12 11:01:04 EST 2011


On 1/12/2011 10:55 AM, Daniel Convissor wrote:
> On Wed, Jan 12, 2011 at 10:00:49AM -0500, justin wrote:
>
>>      /<p(\s+[^>]*)?>.*?<\/p>/s
>
> Uh, what's the ? doing there after the .* in the middle?  The .* is all
> that's needed.

Ungreedy match.

Dan




More information about the talk mailing list