hi $my name $is Chad, how are $you today
list
my
is
you
I found this and tried different things but its a bit beyond me.
Code: Select all
TestText := clipboard
p := RegExMatch(TestText, "$ \K\w+", m)
MsgBox, % m
Code: Select all
TestText := clipboard
p := RegExMatch(TestText, "$ \K\w+", m)
MsgBox, % m
If any capturing subpatterns are present inside NeedleRegEx, their matches are stored in a pseudo-array
Code: Select all
clipboard := "hi $my name $is Chad, how are $you today"
RegExMatch(clipboard, "\$(\w+).*\$(\w+).*\$(\w+)", m)
if (m1) {
msgbox, % m1
; => my
}
if (m2) {
msgbox, % m2
; => is
}
if (m3) {
msgbox, % m3
; => you
}
Code: Select all
TestText := "hi $my name $is Chad, how are $you today"
s := 1
while f := RegExMatch(TestText, "(?<=\$)\w+", m, s)
TextOut .= m "`n", s:= f + StrLen(m)
MsgBox, % TextOut
Users browsing this forum: Bing [Bot], braunbaer, kunkel321, malamutus, mikeyww, neo256, newbieforever, TablePerson22 and 51 guests