Here's a code snippet that does what you'd like to do with <propertyregexp>.
<propertyregex property="regexp.name" input="Foo Bar Blah Blah" regexp="([A-Za-z]+)" replace="myPrefix\1" global="true" casesensitive="false" /> The result is: [echo] Regular expression is: myPrefixFoo myPrefixFoo myPrefixFoo myPrefixFoo Basel Ahmed Federated Systems Group Site Build & Launch (Duluth) [EMAIL PROTECTED] 678-474-3203 "Time is the coin of your life. It is the only coin you have and only you can determine how it will be spent. Be careful, lest you let others spend it for you." --Rod McKuen "Live as if your were to die tomorrow. Learn as if you were to live forever. " -- Mahatma Gandhi "Don't argue for other people's weaknesses. Don't argue for your own. When you make a mistake, admit it, correct it, and learn from it--immediately." -- Stephen Covey <[EMAIL PROTECTED] centure.com> To 08/02/2005 09:21 <user@ant.apache.org> AM cc Subject Please respond to RE: regular expression help "Ant Users List" <[EMAIL PROTECTED] org> Do you mean: <propertyregexp property="testprefix" regexp="\w*" replace="myPrefix"/> But then all the words would be replaced by the prefix , no? Forgive me i ama beginner in regular expressions:) Hind Lwahhabi. Accenture Belgium - Financial Services & Insurance Koningstraat 145 Rue Royale, B-1000 Brussels, Belgium mobile: +32 499567544 phone: + 32 2 226 75 44 E-mail:[EMAIL PROTECTED] -----Original Message----- From: James Fuller [mailto:[EMAIL PROTECTED] Sent: Tue 8/2/2005 3:11 PM To: Ant Users List Subject: Re: regular expression help [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]