Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 18190 invoked from network); 21 May 2008 05:22:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2008 05:22:26 -0000 Received: (qmail 55316 invoked by uid 500); 21 May 2008 05:22:20 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 55285 invoked by uid 500); 21 May 2008 05:22:20 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 55274 invoked by uid 99); 21 May 2008 05:22:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 22:22:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.109.238.66] (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 05:21:26 +0000 Received: from z011100.bk.fin.local (z011100.bk.fin.local [172.18.101.140]) by dnsinet.rzf-nrw.de (8.14.0/8.14.0) with ESMTP id m4L5Lmf5031318 for ; Wed, 21 May 2008 07:21:48 +0200 Received: from z011034.bk.fin.local ([130.11.7.34]) by z011100.bk.fin.local with Microsoft SMTPSVC(6.0.3790.1830); Wed, 21 May 2008 07:21:48 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: AW: AW: generate file list with parameterized regexp Date: Wed, 21 May 2008 07:21:47 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: AW: generate file list with parameterized regexp Thread-Index: Aci6kR4HjP3BWTT9Q2W2lFnpaB0kxQAbisbg References: From: To: X-OriginalArrivalTime: 21 May 2008 05:21:48.0108 (UTC) FILETIME=[913CF8C0:01C8BB02] X-Virus-Checked: Checked by ClamAV on apache.org Ok, I had a look into the source of = org.apache.tools.ant.types.selectors.ContainsRegexpSelector. It checks the 'content' of the file ... - directories are always selected - files are selected its content matches the regexp expression I'll update the manual to make this more clear. After that I think that you want to select files which 'names' match the = regexp. The selector supports simple pattern matching like '*' but no = real regexps. I havent found a builtin one, but with BSF+Java4 or Java6 you could use = a scripted selector. self.setSelected( filename.match(searchRegexp) !=3D null = ); Selected files for ${search.regexp} ${selected} Jan =20 > -----Urspr=FCngliche Nachricht----- > Von: msorens@softhome.net [mailto:msorens@softhome.net]=20 > Gesendet: Dienstag, 20. Mai 2008 17:47 > An: Ant Users List > Betreff: Re: AW: generate file list with parameterized regexp >=20 > Yes I have tried "containsregexp". As far as I could tell,=20 > there is no way=20 > to parameterize the regexp within the fileset, so that does not work.=20 >=20 > Jan.Materne@rzf.fin-nrw.de writes:=20 >=20 > > Have you tried=20 > http://ant.apache.org/manual/CoreTypes/selectors.html#regexpselect ? > > Then you got the 'problem' of correctly masking the regexp.=20 > >=20 > > Jan=20 > >=20 > >> -----Urspr=FCngliche Nachricht----- > >> Von: msorens@softhome.net [mailto:msorens@softhome.net]=20 > >> Gesendet: Dienstag, 20. Mai 2008 07:57 > >> An: user@ant.apache.org > >> Betreff: generate file list with parameterized regexp=20 > >>=20 > >>=20 > >> I am ant-challenged today: I want to find a set of files in a=20 > >> tree matching=20 > >> a given regular expression. The catch is that the regexp is=20 > >> not constant,=20 > >> but is a function of the file name. I have tried permutations of=20 > >> pathconvert, for loops, and loadfile, filterchain, and=20 > >> linecontainsregexp,=20 > >> stumbling when I could not change the property loaded from=20 > >> loadfile after=20 > >> its initial value. Any suggestions? =20 > >>=20 > >>=20 > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > >> For additional commands, e-mail: user-help@ant.apache.org=20 > >>=20 > >>=20 > >=20 > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > For additional commands, e-mail: user-help@ant.apache.org=20 > >=20 > =20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org