Bug 5759 - filter rules: no wildcards match empty strings
Summary: filter rules: no wildcards match empty strings
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.3
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2008-09-14 08:42 UTC by Dieter P
Modified: 2008-09-14 21:50 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dieter P 2008-09-14 08:42:08 UTC
when filtering with pattern rules, all wildcards ( ’*’, ’?’, and ’[’ ) expect at least one character.
So there doesn't seem to be a way to match 'foo', 'foobar' and not match 'fo'.
('foo*','foo**','foo?','foo[a-z]' match foobar but not foo)

Regexes have the pattern modifier '*' for this, shell globbing expands '*' to any string (including empty ones), but this does not seem to be possible with rsync rules syntax.

PS: this bug is somewhat related to https://bugzilla.samba.org/show_bug.cgi?id=5758
Comment 1 Wayne Davison 2008-09-14 21:50:53 UTC
"*" matches 0 or more characters, as does "**".