Posted by bob.chatman@gmail.com on 10/14/06 05:19
Have your tried parsing in two steps?
1) grab the contents of the tags
2) run the tags content through another regex that would lc everythign
but whats in "here"?
Bob
Brad Everman wrote:
> Say I have an HTML file and want to convert all tags to lowercase, but
> leave the attributes alone. For instance:
>
> <SOME TAG ATTRIBUTE="Text THAT may be Upper"></SOME TAG>
>
> Needs to be converted to:
>
> <some tag attribute="Text THAT may be Upper"></some tag>
>
> I can easily convert everything in the tag to lower using '<.*?>' but am
> stuck getting PHP to ignore whatever is in quotes. Any ideas?
>
> Thanks.
[Back to original message]
|