The files that i want to use are very big. For example the csv has 1.500.000 lines
I have a text file (with many other words) this is just an example;
I have a csv with 1.500.000 lines this is just an example:un
mar
word
What i want to do is:un;test0
un;othertest0
University;test1
United;test2
mar;test3
marketing;test4
marketing;test5
marvelous;test
margarita;othertest1
damar;justtest
ora;justtest
ora;nothing
tors;something
word;justtest1
word;testfour
word;othertestzero
wordread;dontfind
born;letit
Find/match exactly the words from the text file in the csv file and export them to a new csv file like:
And not those:un;test0
un;othertest0
mar;test3
word;justtest1
word;testfour
word;othertestzero
So far i have this:University;test1
United;test2
marketing;test4
marketing;test5
marvelous;test
margarita;othertest1
damar;justtest
ora;justtest
ora;nothing
tors;something
wordread;dontfind
born;letit
Code: Select all
#Persistent
fileread, AAAA, test1.csv
FileRead, BBBB, Temp.txt
GGGG := StrSplit(BBBB, [A_Space, "`r`n"], "`-")
For Key, Value in GGGG
;Value = Elias
Loop, parse, AAAA, `r, `n
{
ifinstring, a_loopfield, % Value
{
result .= a_loopfield "`r`n"
}
}
;MsgBox % result
FileDelete, All words found.csv
FileAppend %result%, All words found.csv, UTF-8
ExitApp
Can someone improve the script;un;test0
un;othertest0
University;test1 ; I don't want this
United;test2 ; I don't want this
mar;test3
marketing;test4 ; I don't want this
marketing;test5 ; I don't want this
marvelous;test ; I don't want this
margarita;othertest1 ; I don't want this
damar;justtest ; I don't want this
word;justtest1
word;testfour
word;othertestzero
wordread;dontfind ; I don't want this