secure remote backups
Ben Escoto
bescoto@stanford.edu
Tue, 27 Nov 2001 13:33:32 -0800
--==_Exmh_1146429824P
Content-Type: text/plain; charset=us-ascii
>>>>> "JP" == Jason Piterak <Jason>
>>>>> wrote the following on Tue, 27 Nov 2001 11:14:11 -0500
JP> Ben, Haven't had a chance to dig into rdiff-backup lately, been
JP> too busy with other things. But, I tried your idea of negative
JP> --exclude regex parameters to do positive matches (eg: backup
JP> all archive files) and couldn't get it to work...
JP> Here's what I tried (regex courtesy of our local Perl guru):
JP> --exclude '^(.*?\.(?!(tar|rpm|tgz|gz|z|bz2|Z)).*?|[^\.]*?)$'
Hmm, is it possible there is a bug in python 2.2's regular
expressions? Please confirm, and if I'm not overlooking something
stupid I will submit a bug report on Python's web site.
So, on my version of Python (v2.2b) I get this behavior:
>>> re.match('^a*?$', 'foo')
<SRE_Match object at 0x81841a0>
The expression ^a*?$ is only supposed to match strings composed
entirely of a's, but here it matches 'foo'. In an earlier version of
Python (2.0c1):
>>> re.match('^a*?$', 'foo')
>>>
At least there is some inconsistency between versions. Is the new
behavior a bug? It would appear so, but I not really a regular
expression person (perhaps your perl guy could comment?). Anyway, I
stumbled upon this because your expression above appears to match
everything the way python is interpreting it.
--
Ben Escoto
--==_Exmh_1146429824P
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Exmh version 2.2 06/23/2000
iD8DBQE8BAaM+owuOvknOnURAhoDAJ97izF3Fx51Pkbn96aHNZyXM29SiQCcDnTo
qeV3T085uvZRE7KO3dk1UYI=
=+jUu
-----END PGP SIGNATURE-----
--==_Exmh_1146429824P--