ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: replaceregex issues
Date Mon, 27 Aug 2007 11:18:47 GMT
 


Hi,

-----Original Message-----
From: Vihan Pandey [mailto:vihanpandey@gmail.com] 
Sent: Monday, August 27, 2007 12:00 PM
To: Ant Users List
Subject: replaceregex issues

/*

../http://web1.foo.com with http://web1.foo.com
../../http://web1.foo.com with http://web1.foo.com
../../../http://web1.foo.com with http://web1.foo.com

...

This replaces the ../html by http but the ../../html ../../../html get
left out. The logical conclusion is my regex is wrong. i tried ^(../)*
but that does not help either.

Any suggestions?


*/



untested, try something like =

<replaceregex pattern="[\.\./]{1,}(h.+)" replace="/1" flags="m"/>

or maybe even

<replaceregex pattern="(h.+)" replace="/1" flags="m"/>


Regards, Gilbert








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


Mime
View raw message