Forum Moderators: coopster
<!-- Main Story content START -->
<div class="leftColStory">
<script type="text/javascript">
document.write("<div class=\"findBox\" id=\"resultRelatedContainer39169779\">" +
"<span id=\"resultRelated39169779\"><a href=\"javascript: om_ctrack(this, 'ra-open', 'ra - story - open'); article_loadSimDocs(39169779, '', 'http://management.example.com/careers/0,39024671,39169779,00.htm')\">" +
"<img src=\"/i/s4/gl/ico/related-articles.gif\" width=\"13\" height=\"14\" alt=\"\" title=\"\" border=0/>Show related <br />" +
"<span class=\"alignSecondLine\">articles</span></a></span><div id=\"resultRelatedContent39169779\" style=\"display: none; clear: both\"></div></div>");
</script>
<p>...</p>
<!-- Main Quote at Top START -->
<div class="leftColStoryQuote">
<div class="leftColStoryQuoteImg"><img src="/i/s4/gl/quote-left-dark.gif" width="21" height="18" border="0" alt="" /></div>
<div class="leftColStoryQuoteText">text text text<img src="/i/s4/gl/quote-right-dark.gif" width="21" height="18" border="0" alt="" /></div>
<br clear="all" />
</div>
<!-- Main Quote at Top END -->
<p>text text text</p>
</div>
<!-- Main Story content END -->
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
im using this
preg_match('/<div class="leftColStory">(?>(?:[^<]++¦<(?!\/?div\b[^>]*>))+¦(?R))*<\/div>/is',$html,$body);
preg_match('/<div class="leftColStoryQuoteText">(?>(?:[^<]++¦<(?!\/?div\b[^>]*>))+¦(?R))*<\/div>/is',$html,$body1);
$text = $body[0] . "<p" . $body1[0];
echo $text;
but it doesnt work, i want to display the text between <div class="leftColStory"> and <div class="leftColStoryQuoteText">...please help me..i hope somebody could give me the right code for that...thank you very much
[edited by: eelixduppy at 2:49 am (utc) on Jan. 28, 2008]
[edited by: coopster at 12:40 am (utc) on Oct. 30, 2009]
[edit reason] please use example.com [/edit]
preg_match('/\<div\ class\=\"leftColStory\"\>(.*?)\<\/div\>/ism',$html,$body); And please remember to escape everything other than 0-9 and a-z.