D-Programming-Language/phobos — pull request #1273 by Diggsey (2013-04-23 23:25:05+00:00)
Title: fix issue 9979 - regex back-looper bug

Previously this code would match an empty string:
auto r = regex(r"A\b", "g");

string s = "A";
auto m = s.match(r);

writeln(m);

This fixes the off-by-one error in back-looper and gets it to use the regex position rather than the stream position so there are no problems when the two are out of sync (such as at the end of a stream).