the manual wrote:
If StartingPosition is beyond the length of Haystack, the search starts at the empty string that lies at the end of Haystack (which typically results in no match).
Code:
msgbox % RegexMatch("test", "t", m, 5) ;returns 0, meaning not found
msgbox % RegexMatch("test", ".", m, 5) ;returns 0, meaning not found
msgbox % RegexMatch("test", ".*", m, 5) ;returns 5
I think the last one should yield 0.
So instead of starting searching at the empty string, why not always return 0 when the starting position exceeds the haystack length? I got this problem when I was writing a custom regex function.
Thanks for your consideration.