[Issue 15797] New: Add Option to Not Drop Matches in std.regex.splitter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Mar 14 13:22:31 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15797

          Issue ID: 15797
           Summary: Add Option to Not Drop Matches in std.regex.splitter
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: jack at jackstouffer.com

Either add the option, or give a different overload, to keep the matches when
using std.regex.splitter. For example, currently this happens:

enum split_decimal = ctRegex!(`([\.,])`);
string a = "2003.04.05";
splitter(a, split_decimal).equal(["2003", "04", "05"]);

I would like a way for this to happen:

splitter(a, split_decimal).equal(["2003", ".", "04", ".", "05"]);

--


More information about the Digitalmars-d-bugs mailing list