[Issue 2655] New: Allow alternation patterns in std.path.fnmatch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 11 19:58:51 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2655
Summary: Allow alternation patterns in std.path.fnmatch
Product: D
Version: 1.037
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: bugzilla at digitalmars.com
ReportedBy: wbaxter at gmail.com
It would be nice if fnmatch also supported the standard alternaltion syntax for
wildcards, where "abc.{def,ghi}.jkl" matches either abc.def.jkl or
"abc.gji.jkl".
Attached is a modified version of the function that does that.
Like the current implementation, the additions lack an escape syntax. So it's
not possible to match filename with a literal ',' or '{'. (Just like the
current function is unable to match a literal '[', '*' or '?' in a filename)
--
More information about the Digitalmars-d-bugs
mailing list