mIRC Home    About    Download    Register    News    Help

Print Thread
#107972 15/01/05 01:26 PM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Point me to where I need to go to compare text to text located in a .txt file. In other words if Xtext exists in Text.txt halt , else write Xtext to Text.txt. I just need to figure out how to compare the two. smirk

#107973 15/01/05 01:45 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
That depends on how you want to match it.

If you say "xtext is in file" do you mean an exact instance of xtext without wildcards?

Like:

word1
word2
xtext
word3

or more like:

word1
this is blablaxtextblabla
word2

Specific matching goes with: if !$read(myfile.txt,nw,xtext) { do things }

Wildcard matching like the second thing is: if !$read(myfile.txt,nw,*xtext*) { do things }


Gone.
#107974 15/01/05 03:37 PM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
That was exactly what i needed , thanx!

#107975 16/01/05 01:10 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You're welcome!


Gone.

Link Copied to Clipboard