regexp support

Ben Escoto bescoto@stanford.edu
Tue, 09 Apr 2002 10:02:32 -0700


--==_Exmh_-207951424P
Content-Type: text/plain; charset=us-ascii

>>>>> "LDM" == Louis-David Mitterrand <vindex@apartia.org>
>>>>> wrote the following on Tue, 9 Apr 2002 11:46:30 +0200

  LDM> Using version 0.6.0-1 on debian/unstable I noticed the regexps
  LDM> in --exclude have a strange behaviour:

  LDM> '\.exe$' will not exclude file.exe even though I did not give
  LDM> any start anchor, one have to write '.*\.exe$' which seems a
  LDM> bit counter-intuitive as regexps should match partially.

Hmm, I would have thought the opposite, that regular expressions
should only match from the beginning.

  LDM> Also, is there a way of making exclude regexps
  LDM> case-insensitive? It would be really useful for backing up
  LDM> Windows partitions where one find such junk as file.DoC,
  LDM> file.EXe, etc. Exclude patterns would be much simpler and more
  LDM> readable with '\.(exe|sys)$' than
  LDM> '.*\.([eE][xX][eE]|[sS][yY][sS])$'

If the regular expression starts with (?i) it will be interpreted
case-insensitively.  So '(?i).*\.(exe|sys)$' may be what you want.

If you can think of a better way to specify this tell me, since we are
in the process of adding shell-style patterns instead of regular
expressions.  It seems inelegant to have a completely different switch
(like --exclude-case-insensitive).  Maybe if the expression started
with 'IGNORECASE:'?


--
Ben Escoto

--==_Exmh_-207951424P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Exmh version 2.5 01/15/2001

iD8DBQE8sx6g+owuOvknOnURAh+WAJ9eu8kt6KZ2ZiaKrztFt6rLmcft5wCfdpwO
Qm7f2tmnvsTc7/7EvRRFjlw=
=9R7+
-----END PGP SIGNATURE-----

--==_Exmh_-207951424P--