hi guys,
what is the easiest and most efficient way to search a text file for a keyword.
eg. I have a text file with contents like so
mytext.txt:
stuff stuff {
more stuff ....
}
and again more stuff
...
...
DATASOURCE = ot2 ... ....
even more stuff ...
..
and so on. What i want to do is read this file search for the line with "DATASOURCE =" and grab 'ot2', this line could be anywhere in the file.
thank for any help.
Chris
what is the easiest and most efficient way to search a text file for a keyword.
eg. I have a text file with contents like so
mytext.txt:
stuff stuff {
more stuff ....
}
and again more stuff
...
...
DATASOURCE = ot2 ... ....
even more stuff ...
..
and so on. What i want to do is read this file search for the line with "DATASOURCE =" and grab 'ot2', this line could be anywhere in the file.
thank for any help.
Chris