Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 33311 invoked from network); 21 Jun 2002 17:56:11 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Jun 2002 17:56:11 -0000 Received: (qmail 16100 invoked by uid 97); 21 Jun 2002 17:56:09 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 16084 invoked by uid 97); 21 Jun 2002 17:56:09 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 16071 invoked by uid 98); 21 Jun 2002 17:56:08 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <083001c2194c$d616e9f0$cb14a8c0@web2207lou2> Reply-To: "Lou Fox" From: "Lou Fox" To: "Ant Developers List" , References: <9B3E950CB293D411ADF4009027B0A4D203090C16@PARSV011> Subject: Re: Problems with ReplaceRegex Date: Fri, 21 Jun 2002 13:55:30 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm really sorry but I'm not having any luck still. I added the following string to my properties file. Just for future knowledge where in the documentation does it say that this is how to set an optional task to use a specific class? Here's my code: All of the following has not worked for me: - flags="i,s" - From the documentation I thought the s flag would match a . with end of line characters. Thus I thought match="^.*\.(gif|jpg|js|ram)\^.*" would have worked for me. - \n - I thought was all that was needed for ORO - \r\n - This fine in perl I'm really sorry for being so persistent, but I've only been using ant for the past month, so some of this maybe newbie mistakes. P.S. If I'm successful I can get the company that I work for to move away from bat, perl, and many manual process and start using a tool that is meant for managing the movement of files across various systems. If there is anything I can do to help I'll be more then glad to do it. As is I'm already trying to compile the src, so I can step through it by using jdb. ----- Original Message ----- From: "Stephane Bailliez" To: "Ant Developers List" ; "Lou Fox" Sent: Friday, June 21, 2002 11:30 AM Subject: RE: Problems with ReplaceRegex > > -----Original Message----- > > From: Lou Fox [mailto:loufox@cloud9.net] > > > > The problem is strictly the end of line termination > > character. If I leaves > > aaah.. here we are... deep in shallow water :) > Welcome to the wonderful world of regexp, cross platform and bugs. > > I highly recommend you to check the testcase about the different regexp > wrappers in Ant and you will get the problem in no time. > > Check this first > http://marc.theaimsgroup.com/?l=ant-dev&m=101229498726598&w=2 > > http://marc.theaimsgroup.com/?l=ant-dev&m=101234036101113&w=2 > http://marc.theaimsgroup.com/?l=jakarta-oro-user&m=101234812923654&w=2 > > > The order in which Ant looks for regexp implementation is: > JDK 1.4 > Oro > Regexp > > Otherwise you can force the implementation by using the property > ant.regexp.regexpimpl=org.apache.tools.ant.util.regexp.JakartaOroRegexp > > I recommend Oro for the reasons stated in the posts above. > > Stephane > > > ----- Original Message ----- > > From: "Steven Newton" > > To: "Ant Developers List" ; "Lou Fox" > > > > Sent: Thursday, June 20, 2002 4:36 PM > > Subject: RE: Problems with ReplaceRegex > > > > > > It should be fairly straightforward to resolve, though I recommend > > getting a good reference on regexes if you're going to be doing > > this thing a lot. > > > > First, instead of \r\n use $, this will match the end of line > > no matter > > what platform. Second, I'm guessing the other two backslashes in the > > expression need to be escaped out. So, try this one: > > > > match="^.*\\.(gif|jpg|js|ram)\\^.*$" > > > > s > > > > > -----Original Message----- > > > From: Lou Fox [mailto:loufox@cloud9.net] > > > Sent: Thursday, June 20, 2002 11:23 AM > > > To: ant-dev@jakarta.apache.org > > > Subject: Problems with ReplaceRegex > > > > > > > > > I've been trying to get this replaceregex to work for several > > > days now without any progress. I even wrote the exact same > > > regex in perl and it worked just fine, could someone please > > > look into this for me. > > > Here is the replaceregexp that I'm using: > > > > > > > > byline="true" > > > flags="i" > > > match="^.*\.(gif|jpg|js|ram)\^.*\r\n" > > > replace=""> > > > > > > > > > > > > Currently it doesn't match at all. If I remove the \r\n, > > > then it removes the text from the line, and leaves the \r\n. > > > Adding the flags="s" doesn't change the behavior at all. > > > Using \\r\\n or \n or \\n doesn't match at all. > > > > > > My CLASSPATH is > > > .\;D:\java\jakarta-oro-2.0.6\jakarta-oro-2.0.6.jar;D:\java\xer > > > ces-2_0_1\tools\xerces.jar;d:\j2sdk1.4.0\jre\lib\rt.jar > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: