ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Extracting information out of a file
Date Tue, 31 Mar 2009 22:39:10 GMT

I can't tell from your original post everything you intend to do with this information once
you get it, but you may want to have a look at the <tokens> resource collection.

HTH,
Matt

--- On Tue, 3/31/09, Dylan Farre <dylan.farre@gmail.com> wrote:

> From: Dylan Farre <dylan.farre@gmail.com>
> Subject: Extracting information out of a file
> To: user@ant.apache.org
> Date: Tuesday, March 31, 2009, 7:50 AM
> I am looking for a generic way (Ant
> task) to extract information out of a
> file. For example I have a sql script that calls other sql
> scripts. I want
> to be able to extract the list of these sub scripts. It
> would be great if
> the task would put them in an AntXtras strings type
> contruct, or something
> equivalent (AntContrib maybe?). Ideally, this task would
> allow me to use
> regex pattern matching for the start and end tokens of the
> data I want to
> extract.
> 
> For example sql_main.sql:
> 
> ...
> connect &&user/&&pass@&&db start
> &&db.sub_1.sql
> ....
> 
> I would want to dynamically get the c_d_trig.sql put into a
> AntXtras strings
> or equivalent, by specifying the start token as
> ".*&&db." or even just "."
> and the end token as "&#xD;&#xA;"
> 
> Any help will be appreciated.
> P.S. If no one can help, I'll try the AntXtras forum. Is
> there a separate
> forum for Ant-Contrib?
> Thanks.
> 


      

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


Mime
View raw message