Hello,
There is <propertyregex> task in ant-contrib that
takes a "string" (or a value of a property) as input
and (re)set a property with the new value. I
personally do not use it. Instead, I use the following
trick (the reg exp in it is untested):
<property name="foo.bar" value="foo.bar(1).memory"/>
<echo file=".temfile">${foo.bar}</echo>
<replaceregexp>
<regexp pattern="\(1\)"/>
<substitution expression="_1"/>
</replaceregexp>
<delete file=".tempfile"/>
Regards
Ivan
--- Thod Nguyen <[EMAIL PROTECTED]> wrote:
> Thanks Ivan.
>
> it seems that both <replace> or <replaceregexp>
> requires a file as an input. In my case, i just want
> to format the string with some replaceable
> token(s).
>
> --- "Ivan \"Rambius\" Ivanov"
> <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> >
> > Perhaps you need <replace> or <replaceregexp>
> tasks.
> >
> > Regards
> > Ivan
> >
> > --- Thod Nguyen <[EMAIL PROTECTED]> wrote:
> >
> > > is there a simple way in build.xml to replace
> for
> > > instance, a filename foo.bar(1).memory with
> > > foo.bar_1.memory using one of the existing Ant
> > task
> > > ?
> > >
> > > Thanks
> > > T.N.
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam? Yahoo! Mail has the best spam
> > > protection around
> > > http://mail.yahoo.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]