Code: Select all
#NoEnv
#SingleInstance force
#Warn
sHaystack := "abcyxw"
iMatch := RegExMatch(sHaystack, "^(?P<Begin>.+)y", Match)
if iMatch
sMatch := MatchBegin
else
sMatch := "(nothing)"
MsgBox % "iMatch=" iMatch "`nsMatch=""" sMatch """"
Specifically: MatchBegin (a global variable)
---> 008: sMatch := MatchBegin
and the message box says:iMatch=1
sMatch=""- instead of saying iMatch=1
sMatch="abc".
I tried using the other allowed syntax constructs, such as Mode 3 or numbered rather than named subpatterns, but to no avail. What am I missing?