Code: Select all
if regexmatch(apple + [1-9]) ; if detect a specific word plus a number 1-9
var:= apple ; make var equal to the word without the number
Code: Select all
if regexmatch(apple + [1-9]) ; if detect a specific word plus a number 1-9
var:= apple ; make var equal to the word without the number
Code: Select all
text := "apple8"
RegExMatch(text, "\D+", var)
MsgBox, % var
Code: Select all
string := "apple9"
RegExMatch(string, "O)(\D+)\d", UnquotedOutputVar)
msgbox, % UnquotedOutputVar[1]
; => "apple
Users browsing this forum: No registered users and 348 guests