But it's wired that the ObjMatch.Count is always 0.
Any idea to fix it? Thanks.
Code: Select all
msgbox Str_LastCharPos("1.2.33.",".")
Str_LastCharPos(InputStr,InChar)
{
if(InStr("\.*?+[{|()^$",InChar))
InChar:="\" . InChar ; Escape some chars
Pos:=RegExMatch(InputStr, InChar , &ObjMatch, 1)
If(Pos>0)
{
MatchNumber:=ObjMatch.Count
msgbox MatchNumber
LastMatchPos:=ObjMatch.Pos[MatchNumber]
return LastMatchPos
}
else
return 0
}