You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by hi...@accenture.com on 2005/08/02 14:58:31 UTC

regular expression help

Hello guys;
I would like some help for the following.
Using <propertyregexp> how would you perform the following:

input string="Foo Bar Jeff Blabla"
replacing prefix="myPrefix"
result string="myPrefixFoo myPrefixBar myPrefixJeff myPrefixBlabla"

I am doing it currently  with <scriptdef> but i am sure there is an elegant way to do so using regular expressions.
Any help is welcome.
Thanks!


Hind Lwahhabi.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


Re: regular expression help

Posted by James Fuller <ji...@ruminate.co.uk>.
hind.lwahhabi@accenture.com wrote:

>Hello guys;
>I would like some help for the following.
>Using <propertyregexp> how would you perform the following:
>
>input string="Foo Bar Jeff Blabla"
>replacing prefix="myPrefix"
>result string="myPrefixFoo myPrefixBar myPrefixJeff myPrefixBlabla"
>  
>
 \w* should match every word or u could use the ^ method.


I normally use something like this to match words
/\b([A-Za-z]+)\b


gl, Jim Fuller




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