http://qs321.pair.com?node_id=146178

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
<td>english text</td>
and want to change it to
<td>swedish 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><b>uk text</b></td>
to
<td><b>swedish text</b></td>
thanks