fix issue 10772 std.regex.splitter generates spurious empty elements

[Issue 10772](https://d.puremagic.com/issues/show_bug.cgi?id=10772)