Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with search / findrx file
#5
Use this code when you have a string and want to know if it exists in a list of strings in a file.

Code:
Copy      Help
;this code loads a string list from a file to variable m
str test2.getfile("$desktop$\test.txt")
IStringMap m=CreateStringMap(1|2)
m.AddList(test2 "[]")

;then you can use m.Get (any number of times) to search for a string in the list
str test="result"
if(m.Get(test))
,out "found"
else
,out "not found"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)