Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 75978 invoked from network); 2 Aug 2005 15:46:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Aug 2005 15:46:08 -0000 Received: (qmail 20149 invoked by uid 500); 2 Aug 2005 15:45:58 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 20104 invoked by uid 500); 2 Aug 2005 15:45:57 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 20091 invoked by uid 99); 2 Aug 2005 15:45:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 08:45:57 -0700 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=INFO_TLD,NO_REAL_NAME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of hind.lwahhabi@accenture.com designates 170.252.72.95 as permitted sender) Received: from [170.252.72.95] (HELO ememr1003.accenture.com) (170.252.72.95) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 08:45:48 -0700 Received: from EMEXV1002.dir.svc.accenture.com ([10.130.16.105]) by ememr1003.accenture.com (8.13.4/8.13.4) with ESMTP id j72FjgmC007550 for ; Tue, 2 Aug 2005 16:45:55 +0100 (WEST) Received: from emexr1002.dir.svc.accenture.com ([10.130.16.111]) by EMEXV1002.dir.svc.accenture.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 2 Aug 2005 17:45:43 +0200 Received: from EMEXM0102.dir.svc.accenture.com ([10.130.16.100]) by emexr1002.dir.svc.accenture.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 2 Aug 2005 17:45:43 +0200 Content-Transfer-Encoding: 7bit X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.326 Importance: normal Content-Class: urn:content-classes:message Priority: normal MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C59779.3E3CD1DF" Subject: RE: Another Problem with a regular expression Date: Tue, 2 Aug 2005 17:45:01 +0200 Message-ID: <35F56E214D71814B80E64DCA5B770E520B215D@EMEXM0102.dir.svc.accenture.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: <35F56E214D71814B80E64DCA5B770E520B215D@EMEXM0102.dir.svc.accenture.com> Thread-Topic: Another Problem with a regular expression thread-index: AcWXdmdKBUvL2tHXSEiCox5HZnhRuQAAr2+Y From: To: X-OriginalArrivalTime: 02 Aug 2005 15:45:43.0728 (UTC) FILETIME=[3E050300:01C59779] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C59779.3E3CD1DF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I tried with 4 backslashes but no change: c:\\\\foo\\\\bar\\\\dude Hind Lwahhabi. -----Original Message----- From: Gisbert Amm [mailto:gia@webde-ag.de] Sent: Tue 8/2/2005 5:25 PM To: Ant Users List Subject: Re: Another Problem with a regular expression =20 You need to escape the backslashes, see e.g.=20 http://www.regular-expressions.info/java.html Regards, Gisbert Amm hind.lwahhabi@accenture.com wrote: >=20 > Hello; > it's me again. > i tought everything was fine but then i saw strange problem with my = propertyregexp usage. > my snippet is: > >=20 > some.dir being an absolute windows directory: c:\foo\bar\dude > some.input being a relative directory=3D /some/other/directory > when i run this i get as a result: > C\:foobardude/some/other/directory >=20 > with allthe "\" removed from some.dir. >=20 > Any clue? > (i tried to add the backslach in regexp but it does not change = anything...) >=20 >=20 >=20 > Hind Lwahhabi. >=20 >=20 >=20 > -----Original Message----- > From: hind.lwahhabi@accenture.com [mailto:hind.lwahhabi@accenture.com] > Sent: Tue 8/2/2005 4:36 PM > To: user@ant.apache.org > Cc: antuser@gmail.com > Subject: FW: regular expression help+tokens instead of words > =20 >=20 >=20 > Hind Lwahhabi. >=20 >=20 >=20 > -----Original Message----- > From: Lwahhabi, Hind > Sent: Tue 8/2/2005 4:34 PM > To: Ant Users List Patrick Martin > Subject: RE: regular expression help+tokens instead of words > =20 >=20 > no because the line does not start with a blank. > thanks anyway:) > i have solved my problem(see my previous mail) with = regexp=3D"([0-9A-Z\/\.a-z]+)" replace=3D"myPrefix\1" >=20 > Hind Lwahhabi. >=20 >=20 >=20 >=20 > -----Original Message----- > From: Patrick Martin [mailto:antuser@gmail.com] > Sent: Tue 8/2/2005 4:32 PM > To: Ant Users List > Subject: Re: regular expression help+tokens instead of words > =20 > Hi, >=20 > You could try to replace the blank character by ' myPrefix' (not the > blank before myPrefix). >=20 > input=3D"Foo Bar Blah Blah" > regexp=3D" " > replace=3D" myPrefix" > global=3D"true" > casesensitive=3D"false" /> >=20 > Patrick Martin >=20 > On 8/2/05, hind.lwahhabi@accenture.com = wrote: >=20 >>thanks Ahmed it works for the sample string i provided. >>My question is how can you avoid special characters e.g instead of Foo = Bar blabla , you have: >>input string=3Dfoo/bar.ext foo/some1.ext. >>The goal is to match the tokens separated by blank space and not = words. >> >>Thanks for any help! >> >> >>Hind Lwahhabi. >> >> >> >> >>-----Original Message----- >>From: Basel Ahmed [mailto:Basel.Ahmed@fds.com] >>Sent: Tue 8/2/2005 3:42 PM >>To: Ant Users List >>Cc: user@ant.apache.org >>Subject: RE: regular expression help >> >>Here's a code snippet that does what you'd like to do with >>. >> >>> input=3D"Foo Bar Blah Blah" >> regexp=3D"([A-Za-z]+)" >> replace=3D"myPrefix\1" >> global=3D"true" >> casesensitive=3D"false" /> >> >> >>The result is: >> [echo] Regular expression is: myPrefixFoo myPrefixFoo = myPrefixFoo >>myPrefixFoo >> >>Basel Ahmed >>Federated Systems Group >>Site Build & Launch (Duluth) >>basel.ahmed@fds.com >>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 >> >> >> >> > centure.com> >> = To >> 08/02/2005 09:21 >> AM = cc >> >> = Subject >> Please respond to RE: regular expression help >> "Ant Users List" >> > org> >> >> >> >> >> >> >> >> >>Do you mean: >> >>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:hind.lwahhabi@accenture.com >> >> >> >>-----Original Message----- >>From: James Fuller [mailto:jim.fuller@ruminate.co.uk] >>Sent: Tue 8/2/2005 3:11 PM >>To: Ant Users List >>Subject: Re: regular expression help >> >>hind.lwahhabi@accenture.com wrote: >> >> >>>Hello guys; >>>I would like some help for the following. >>>Using how would you perform the following: >>> >>>input string=3D"Foo Bar Jeff Blabla" >>>replacing prefix=3D"myPrefix" >>>result string=3D"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 >> >> >> >> >>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: user-unsubscribe@ant.apache.org >>For additional commands, e-mail: user-help@ant.apache.org >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>For additional commands, e-mail: user-help@ant.apache.org >> >> >> >> >>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: user-unsubscribe@ant.apache.org >>For additional commands, e-mail: user-help@ant.apache.org >> >> >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > 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. >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 >=20 >=20 >=20 > 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. >=20 >=20 >=20 > = ------------------------------------------------------------------------ >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org 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. ------_=_NextPart_001_01C59779.3E3CD1DF Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org ------_=_NextPart_001_01C59779.3E3CD1DF--