regexp support

Ben Escoto
Tue, 09 Apr 2002 10:02:32 -0700

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

>>>>> "LDM" == Louis-David Mitterrand <>
>>>>> 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

Ben Escoto

Content-Type: application/pgp-signature

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