ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Desjardins <peter.desjardins...@gmail.com>
Subject Regular expression to match non-breaking spaces
Date Fri, 11 Mar 2011 18:26:28 GMT
Hi. I'm trying to replace every non-breaking space character in a file
with a normal space character. The source file is encoded using UTF-8.
I can't get this to work using the replaceregexp task. Here's the
syntax I'm using:

  <replaceregexp file="myfile.xml" match="&#xa0;" replace=" "
flags="g" byline="true" encoding="utf-8" />

I've tried other ways to match non-breaking spaces (&#160; \0240
U+00A0) but have had no success yet. I didn't alter the regular
expression libraries in my Ant installation. Is that what I need to
do? Or is there a string I can put into the match attribute that will
match UTF-8 non-breaking spaces?

Thanks for your help.

Peter Desjardins

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message