mark wrote:
you need pattern modifier s (PCRE_DOTALL)preg_match_all("|<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\">(.*)</font>|U",$content, $body, PREG_PATTERN_ORDER);the example text im trying to grab is below - Anyone got any ideas, Ive tried pattern modifying with /m but I cant implement it. Please help Thanks Mark
this makes . match all chars including newline
m (PCRE_MULTILINE) just affexts where ^ and $ match
the following worked for me ...
<?
$content = '<font face="Verdana, Arial, Helvetica, sans-serif" size="1">
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text
text text text text text text text text text text text text text text text
text text
text text text text text text text text text text text
text text text text text.
</font>';
preg_match_all("|<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\">(.*)</font>|sU",$content, $body, PREG_PATTERN_ORDER);
foreach($body[1] as $key => $font){
print htmlspecialchars($font)." <br>\n";
?>
--
Sean
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php