
06-09-2003, 02:21 PM
|
 |
Senior Contributor
* Expert *
|
|
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
|
|
Well, not complicated. You will have to open the file:
Code:
Open app.path & "\bob.txt" for binary as #1 'Open the file for bianry access
get #1,1,strHolder 'get, starting at byte one, and place in strHolder
close #1 'close the file
Once its been placed in strHolder, you can use the InStr fucntion to search the string:
Code:
temp = instr(1,strHolder,"Bob") 'search the string for first occurance of "Bob"
This will return the character number of the strin "Bob" inside of strHolder. It will return 0 if not found.
Or you can use InStrRev(). The search begins from the end of string, but the position returned counts from the beginning of the string
|
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)
"Perl - The only language that looks the same before and after RSA encryption."
|