Say I had this piece of HTML for example:
<div id="gallery2" class="galleryElement">
<h2>My Photos</h2>
<div class = "imageElement">
<h3>@Embassy - VIP </h3>
<p><b>Image URL:</b>
<a href = "http://photos-p.friendster.com/photos/78/86/77426887/1_119466535.jpg" target = "_blank">http://photos-p.friendster.com/photos/78/86/77426887/1_119466535.jpg</a></p>
<a href = "http://photos-p.friendster.com/photos/78/86/77426887/1_119466535.jpg" title = "open image" class = "open"></a>
<img src = "http://photos-p.friendster.com/photos/78/86/77426887/1_119466535.jpg" class = "full"/>
<img src = "http://photos-p.friendster.com/photos/78/86/77426887/1_887303260m.jpg" class = "thumbnail"/>
</div>
<div class = "imageElement">
<h3>@Embassy - VIP </h3>
<p><b>Image URL:</b>
<a href = "http://photos-p.friendster.com/photos/78/86/774534426887/1_119466535.jpg" target = "_blank">http://photos-p.friendster.com/photos/78/86/77426887/1_119466535.jpg</a></p>
<a href = "http://photos-p.friendster.com/photos/78/86/774534426887/1_119466535.jpg" title = "open image" class = "open"></a>
<img src = "http://photos-p.friendster.com/photos/78/86/774534426887/1_119466535.jpg" class = "full"/>
<img src = "http://photos-p.friendster.com/photos/78/86/774534426887/1_887303260m.jpg" class = "thumbnail"/>
</div>
</div>
I nid to build the proper regex expression to parse each div class'ed as imageElement and store the contents (as text) in an array starting drom the opening <div class = "imageElement"> till it's ending div pair </div> Also, there really are spaces on class = "imageElement". So far the expression:
\<div class = "imageElement">[\s\S\d\D]*</div>
but it only gets the whole set of elements. Thanks in advance :p