ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: FilterChain is there a regexp?
Date Mon, 13 Jan 2003 20:06:38 GMT
Didn't someone before Xmas write about a little regex property morphing
task? That way, you can just load the file into a property, and extract the
needed tag using that custom task.

Or is it still the jetlag making me invent stuff ;-) --DD

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Friday, January 10, 2003 5:43 AM
To: ant-dev@jakarta.apache.org
Subject: Re: FilterChain is there a regexp?

On Fri, 10 Jan 2003, Jose Alberto Fernandez
<jalberto@cellectivity.com> wrote:

> I am not sure I understood, do <linecontainsregexp> and
> <replaceregexp> already exists or are those just the names you are
> proposing for them?

They exist (<replaceregexp> is a(n optional) task, not a filter,
though) in 1.5.

   <copy file="${basedir}/CVS/Tag" tofile="curtag.txt"/>
   <replaceregexp file="curtag.txt" match=".\(.*\)" replace="\1"/>
   <loadfile property="curbranch" srcFile="curtag.txt">
       <filterchain>
           <striplinebreaks/>
       </filterchain>
   </loadfile>
   <delete file="curtag.txt"/>

is a way without sed, that is as silly as your original 8-)

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message