in reply to Help on using alternation grouping star versus dot star.

In Friedls book Mastering Regular Expressions this technique is called loop unrolling. Your second example is bad because of the nested * - Perl should warn you about them. I would write it as:
m{<div\s+class\s*=\s*"blockqte"\s*>((?:[^<]+|</?s)*)</div>}

-- Abigail

Replies are listed 'Best First'.
Re: Re: Help on using alternation grouping star versus dot star.
by Anonymous Monk on Jun 15, 2001 at 09:45 UTC
    Hi Abigail. Thank you for the advise. Could you please explain to this neophyte why changing the nested * to a nested + makes so much of a difference. Mark.