Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with search / findrx file
#1
Hi there,

I have a problem with a thing i'm trying and cannot get it done, what i want is this: after i found a result from a text (for example "result") i want it to compare it with another result which is a file on the desktop (i retrieve this in a string). The string is built like this:

one
two
three
four
result
five

i want to compare the first search ("result") with the file, and a message for notice

findrx(string_result string_file 1|8 string_found 0) <= doesn't work

Am i looking over something or is the approach wrong?

Any help is appreciated...

Freggel
#2
The whole code, as you have so far, would help us to better understand and help you.

Also I see mistakes in findrx.
#3
Hi,

Code i have is something like this:

str example="find [email protected]"
str test
findrx(example "emailadres@aol\.com" 0 1|16 test 0)
str test2
str output
test2.getfile("c:\test.txt")
findrx(test test2 0 1|4 output 0); err
out output

But you say the findrx is wrong?

I tried several things, everyting didn't work althoug the strings are populated with the right values...

Thanks for the time ...

freggel
#4
Hi there...

Is there nobody who can point me in the right direction or give me a hint?

i tried everyting i know but it doesn't seem to work...

Grz

Freggel
#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"


Forum Jump:


Users browsing this thread: 1 Guest(s)