Java Mailing List Archive

Apache Ant Archive

» Ant Users List
» Ant Developers List
regex text out of a file

regex text out of a file

2007-07-19       - By Dominique Devienne
Reply:     1     2     3     4     5     6     7     8     9  

<loadfile> with a regex FilterReader can give you a property that
contains only the scipt source files. You can then use the property in
a <fileset> includes attribute, providing the proper dir to look for
the files. --DD

On 7/19/07, Alex Egg <eggie5@(protected)> wrote:
> I need help with this task:
> I have an HTML file with this snippet:
> <!-- begin includes -->
> <script src="scripts/script1.js" />
> <script src="scripts/script2.js" />
> <script src="scripts/script3.js" />
> <!-- end includes -->
> I would like to get each the src attribute value of each script tag, e.g.
> "scripts/script1.js, scripts/script2.js, scripts/script3.js "
> After I extract the scripts I would like to be able to pass them another ant
> task in my build file as a fileset or something.
> I'm pretty sure I'm going to have to write my own task, because this is not
> a very generic operation. But, can anybody think of any way I can use any
> existing tasks out there to do this for me?
> Thank,
> Alex

To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.