costas has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
i have a reg ex query i need help with.
I am basically substituting massive pages of html doc in english to swedish and need help in keeping tags such as html bold tags and italic tags whilst only changing the text viewable on a browser.
basically if i have
I am basically substituting massive pages of html doc in english to swedish and need help in keeping tags such as html bold tags and italic tags whilst only changing the text viewable on a browser.
basically if i have
and want to change it to<td>english text</td>
it works fine, however some td tags contain b tags and i want to keep them intact. HOw can i write the reg ex so that if a b tag exists then keep it. ie.... from<td>swedish text</td>
to<td><b>uk text</b></td>
thanks<td><b>swedish text</b></td>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: shameful reg expression
by dragonchild (Archbishop) on Feb 18, 2002 at 17:32 UTC | |
Re: shameful reg expression
by grep (Monsignor) on Feb 18, 2002 at 17:34 UTC | |
Try HTML::Parser
by Kozz (Friar) on Feb 18, 2002 at 17:36 UTC |
Back to
Seekers of Perl Wisdom