On Sunday, 20 December 2020 at 04:33:21 UTC, Виталий Фадеев wrote:
On Saturday, 19 December 2020 at 23:16:18 UTC, kdevel wrote:
On Saturday, 19 December 2020 at 12:52:54 UTC, Виталий Фадеев
wrote:
...
"retro" possible when using simple expression "abc".
For complex "ab\w" or "(?Pregex)" shoul
On Saturday, 19 December 2020 at 23:16:18 UTC, kdevel wrote:
On Saturday, 19 December 2020 at 12:52:54 UTC, Виталий Фадеев
wrote:
Goal:
size_t pos = findRegexBackward( r"abc"d );
assert( pos == 4 );
module LastOccurrence;
size_t findRegexBackward_1 (dstring s, dstring pattern)
{
i
On Saturday, 19 December 2020 at 12:52:54 UTC, Виталий Фадеев
wrote:
Goal:
size_t pos = findRegexBackward( r"abc"d );
assert( pos == 4 );
module LastOccurrence;
size_t findRegexBackward_1 (dstring s, dstring pattern)
{
import std.regex : matchAll;
auto results = matchAll (s, pat
We have:
dstring s = "abc3abc7";
Source:
https://run.dlang.io/is/PtjN4T
Goal:
size_t pos = findRegexBackward( r"abc"d );
assert( pos == 4 );
How to find regex in backward direction ?