Re: PHP RegExp and HTML tags attributes values etc...
| From: | Jason Petersen | Date: | Thu, 10 Mar 2005 16:47:27 +0000 |
| Subject: | Re: PHP RegExp and HTML tags attributes values etc... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-210449@lists.php.net to get a copy of this message | ||
On Thu, 10 Mar 2005 00:18:05 +0100, BlackDex <black.dex@lycos.nl> wrote:
> Hello ppl,
>
> I have a question about regex and html parsing.
>
> I have the following code:
> ---
> <p class=MsoNormal><font size=3 face="Comic Sans MS"><span lang=NL
> style='font-size:12.0pt;font-family:"Comic Sans
> MS"'> </span></font></p>
I'm guessing that you're writing a function to parse "HTML" that users
upload via a web form? I would start with a look at this Perl script
to fix code generated by MS products:
http://www.fourmilab.ch/webtools/demoroniser/
Also, PHP's "libtidy" extension might be useful for you, although I
haven't used it personally.
http://us2.php.net/manual/en/ref.tidy.php