ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: AW: Backspace in regular expression
Date Wed, 23 Jun 2004 10:18:29 GMT
Hi Peter, I thinki that I started ver stubborn topic.

--- Peter Reilly <> wrote:
> Ah, uou want the character backspace in the
> resultant file?
> Like:
> tr[backspace]
> gt[backspace]
> so it looks like:
> t
> g

Yes, that is right.
> I am not to sure how to do this with xml characters.
> One can use
> <script> to set up a property with contain the
> backspace character:
>   <target name="replacebackspace">
>     <script language="beanshell">
>       project.setNewProperty("backspace", "\b");
>     </script>
>     <delete quiet="yes" file="x.txt"/>
>     <concat destfile="x.txt">
>     </concat>
>     <replaceregexp flags="g" file="x.txt">
>       <regexp pattern="BACKSPACE"/>
>       <substitution expression="${backspace}"/>
>     </replaceregexp>
>     <concat><fileset file="x.txt"/></concat>
>   </target>

I tested it and it works like a charm. But can you
make it work when the contents of x.txt is this
<concat destfile="x.txt">

In my opinion it should output
<empty line>
<empty line>
but it outputs 

So there are too many abguities in my desire to
replace expressions with backspace and you might
abandon it.

Thank you for your help.
Regards Ivan

Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage! 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message