Thanks, I would try that ... I have to write a report after that saying
these java file names were found/not found in html file. 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 07, 2004 10:13 AM
To: [EMAIL PROTECTED]
Subject: AW: find/replace

> Is there any way in using Ant that we can extract/find/match "strings"
> in html/excel file with a list of strings (java file names). 

Excel is not a fine format to work with ... from the Java point of view.
See the notes on the Apache POI project.
It would be better to export the XLS to a simple text format like CSV.
Then
you can work simply with regular expressions, iterating over lines and
using
String.split().


> I have a big html file and a big excel file. I alwaz need to dig eyes
> into the excel column first to copy the java file name and then search
> it in the html file.

Sounds like these steps:
1. extract the java file names from excel
2. iterate over that list
3. search in html file(s)
4. Do ... what?


1. Extract the java file names from excel
a) XLS -> CSV
   Simply "Save As", or write a macro doing that.
b) extract the names from text file
   Would try <loadfile> with <filterchain>, maybe with <linecontains>
filter.
   And the <tokenfilter> with <replaceregex> should select only the
name.

2. Iterate
   Use AntContribs <for>.

3. Search
   It depends on what you want to do. For "just" editing the
<replaceregexp>
optional task
   could be useful.


Jan

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

Reply via email to