Code: Select all
limit := 2 ; the maximum number of replacements to allow
MsgBox % Func("StrReplace").bind("H_yst_ck", "a", "_").call(, limit)
MsgBox % Func("RegExReplace").bind("H_yst_ck", "a", "_").call(, limit)
; (because?) the string should remain unchanged as it does not contain 'a'... unexpected results are returned such as 斘/᷸/tack, 斘5᷸5tack etc.
MsgBox % Func("RegExReplace").bind("H_yst_ck", "_", "a").call(, limit) ; Haystack
MsgBox % (f:=Func("RegExReplace").bind("H_yst_ck", "_", "a")).call(, limit) ; Haystack
MsgBox % (Func("RegExReplace").bind("H_yst_ck", "_", "a").call(, limit) == "Haystack") ; Haystack
Due to an inability to appreciate the scale of possible implications - if any - and, thus, if it is by design, negligible etc. I decided to report the pseudo-problem (since it did not arised and does not seem to be able to arise in any real use case) in the bug reports for assessment.
Thank you.