www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2655] New: Allow alternation patterns in std.path.fnmatch

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: wbaxter 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)


-- 
Feb 11 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2655






Created an attachment (id=289)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=289&action=view)
fnmatch function enhanced with {,} patterns


-- 
Feb 11 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2655


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement




-- 
Feb 26 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2655


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 11 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2655


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



13:03:09 PDT ---
Included with credit the proposed function and unittest, with minor changes.
Thanks!

http://www.dsource.org/projects/phobos/changeset/2058

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 26 2010