$return = preg_replace('#<h[1-9]>(.*)</h[1-9]>#Uie', 'str_replace("<br />", "", "$1")');
- Tul
Kathleen Ballard wrote:
Sorry, Here is the code I am using to match the <h*> tags:
<h([1-9]){1}>.*</h([1-9]){1}>
I have removed all the NL and CR chars from the string I am matching to make things easier. Also, I have run tidy on the code so the tags are all uniform.
The above string seems to match the tag well now, but I still need to remove the br tags from the tag contents (.*).
The strings I will be matching are html formatted text. Sample <h*> tags with content are below:
<h4>Ex-Secretary Mickey Mouse <br />Loses Mass. Primary</h4>
<h4>Ex-Secretary Mickey Mouse <br />Loses Mass. Primary <br /> Wins New Jersey</h4>
<h4>Ex-Secretary Reich Loses Mass. Primary</h4>
Again, any help is appreciated. Kathleen
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php