Im trying to remove all words containing UP & Down in an array, but i cant get the results to combine into a new variable ...
So basically remove any words with up ie 'ETHUPUSDT' or down from the array, & then copy the processed array to the clipboard
Thanks!
Code: Select all
#SingleInstance, force
string := "DOWN"
Clipboard =
(
'BTCUSDT','XRPDOWNUSDT','MANAUSDT','ETHUPUSDT','BUSDUSDT','GALAUSDT','SUPERUSDT','SHIBUSDT','SOLUSDT'
)
tempArray := StrSplit(RegExReplace(Clipboard,","," "), " ")
;MsgBox % tempArray[1]
x:=10000
xl:=0
Loop, %x%
{
xl++
xs := tempArray[xl]
;msgbox %xs%
If InStr(xs, string)
{
xs:=xl
;MsgBox % "linenumber=" xs " " tempArray[xs]
tempArray[xs]:=""
AddVar:= AddVar . tempArray[xs]
}
AddVar= % AddVar . tempArray[xs]
;MsgBox % AddVar
}
Clipboard:=AddVar
MsgBox % Clipboard
return