Using ant, find files matching a regular expression and search if a substring in present in the file
问题 I have a directory containing 2 files: abc_2010-14-12.log abcdef.log I want to search for a substring in the 1st file. But i dont know the exact file name as it has timestamp appended to it. I think i will have to use regular expression in the file name. 回答1: First you must identify the file. You may be able to do that using a normal fileset include: <fileset dir="." id="the.file" includes="abc_????-??-??.log" /> If that might give you a false positive on something like 'abc_XXXX-YY-ZZ.log',