If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Fixing unescaped ampersands

I've got a MySQL db which has unescaped ampersands (&) which need fixing without changing any properly escaped ampersands and other entities which are present - ie I need to change & to &amp; without changing &amp; to &amp;amp; or ń to &amp;#324;.

I thought I'd be able to do it with a regular expression in a MySQL query but it seems this won't work as MySql doesn't support negative lookaheads in regular expressions.

Any suggestions as to how this could be achieved would be very welcome!