Parsing HTML
| From: | Henry | Date: | Mon, 28 Oct 2002 10:35:34 +0000 |
| Subject: | Parsing HTML | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121672@lists.php.net to get a copy of this message | ||
Hi All,
I would like to be able to do a serach and replace in a HTML document. For a
list of words;
for example:
hello become buongiorno
yes becomes si
size become grossezza
The problem is that if I change the word "size" without considering html
tags and html comments in the case of inline javascripts I'll end up with
"broken" html.
Is there a way to only do the search and replace outside the tags and
comments.
It is further complicated by the fact that I would still like to do the
replacements within strings for example within meta tags!
Any ideas.
Henry