in reply to Re^2: space before and after
in thread space before and after

So the output is wrong, then.

s/\s+(?=<)//g; s/(?<=>)\s+//g;

Replies are listed 'Best First'.
Re^4: space before and after
by Anonymous Monk on Sep 03, 2009 at 08:11 UTC
    Please tell me how to remove the space in "<br/>" ahead and behind the text
    __DATA__ Hi &lt;br/&gt; r u
      This is getting very repetitive, maybe you can adopt any of the previous examples
      s~\Q <br> \E~<br>~ib;