Hi all,

I have a regular expression to find some html and add some additional
HTML to it:

The regex string is:

$regex = '#(<div[^>]+id="cpanel">.*?)'.
         '(<div style="float:left;">.*?<div
class="icon">.*?</div>.*?</div>)+'. //this needs to be greedy
            '(.*?</div>.*?</td>)#ism' //instead the first .*? becomes greedy



The 2nd line html elements repeat and I don't know how often. I'd like
to capture all of the repetition, currently it only captures the first
element.

Any pointer of how to make the ()+ greedy?


Kind Regards,

Jochen Daum

Chief Automation Officer
Automatem Ltd

Phone: 09 630 3425
Mobile: 021 567 853
Email: [email protected]
Skype: jochendaum
Website: www.automatem.co.nz
http://twitter.com/automatem
http://www.xing.com/go/invite/3425509.181107

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to