new break tags
| From: | bill | Date: | Fri, 29 Jun 2001 15:27:47 +0000 |
| Subject: | new break tags | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-55554@lists.php.net to get a copy of this message | ||
I'm trying to fix two regular expressions to work with the new break
tags.
This
$breaks=preg_match_all("/<br>\s+<br>/i", "$text", $parts)
and this
preg_replace("/<br>\s+<br>/i","</P><P
class=\"doserif\">",$text)
Now that PHP 4.0.5 has changed the nl2br() function, it no longer
replaces new lines with:
<br>
but instead with the new XHTML compliant break tags:
<br />
I tried just substituting the new tag into the above regular expressions
to no avail. Any ideas?
kind regards,
bill hollett