On Sunday, 3 February 2019 at 18:07:13 UTC, Chris Bare wrote:
auto matches = matchAll(str, searchRegex);

foreach (m; matches) // this walks the list forward

I tried:
foreach_reverse (m; matches)
foreach (m; reverse (matches))
foreach (m; retro (matches))

and they all failed to compile.
I also tried to index matches (matches[i]) but that does not work either.

matchAll is a forward range, whereas retro requires a bi-directional range.
So using the array function should work:
foreach (m; matches.array.retro)

Jordan

Reply via email to