> From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
> 
> On Thu, 9 Jan 2003, Jose Alberto Fernandez <[EMAIL PROTECTED]>
> wrote:
> 
> > Is there somewhere an implementation of a ChainFilter for regexp?
> 
> Depends on what you want to do: <linecontainsregexp>?
> 
> > I need the same functionality that is available in the <mapper
> > regexp> but to process the content of a file (line by line).
> 
> I see.  Wouldn't be too hard to implement using the regexp stuff that
> has been introduced with <replaceregexp> IMHO.
> 

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

My real silly need relates to some CVS targets I am trying to define. 
I need to get the name of the current CVS branch of my build. And the only what 
I see getting it is by looking at CVS/Tag file. But in there the name
is preceded by a one char code and I could not found a way to remove this 
first char without using "sed". A real pitty, you would thing we should be 
able to do such a simple thing without requiring executing external progs.

   <!--Stupid way to obtain the current branch of the top directory-->
   <exec executable="sed" output="curtag.txt">
       <arg value="-e"/>
       <arg value="s/.\(.*\)/\1/"/>
       <arg value="${basedir}/CVS/Tag"/>
   </exec>
   <loadfile property="curbranch" srcFile="curtag.txt">
       <filterchain>
           <striplinebreaks/>
       </filterchain>
   </loadfile>
   <delete file="curtag.txt"/>

If anyone has a simpler solution for this, please let me know.

Jose Alberto

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to