Bug 15797 – Add Option to Not Drop Matches in std.regex.splitter
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-14T20:22:00Z
Last change time
2016-04-12T08:17:37Z
Assigned to
nobody
Creator
jack
Comments
Comment #0 by jack — 2016-03-14T20:22:31Z
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"]);
Comment #1 by github-bugzilla — 2016-04-12T08:17:36Z