in reply to reg expression needs a tweek

You may be able to get away by replacing \S with [^\s>] (untested). But are you sure you want \S? It does mean that:
<entry>2 2<?Pub _hardspace?>AWG or larger</entry>
turns into
<entry>2 <xx>2 AGM</xx> or larger</entry>