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
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/02e11abd5403fcded9dbf18eb22b76db5a19a5e2 Fix Issue 15797: Add keepSeperator option to std.regex.splitter https://github.com/D-Programming-Language/phobos/commit/6c0dbab725b1fae9bc84d5f5bfaa43ba83527b13 Merge pull request #4174 from JackStouffer/issue15797 [Issue 15797] Add std.regex.splitterWithMatches