-
In a program I'm using to edit certain aspects of a configuration file, I read the entire contents of the file into an array (each index representing one line of the array).
Then, using a for loop I'd like to go through the array until I find a line that STARTS WITH "DataEntry1" (minus the quotes). The problem is there will probably be text AFTER that DataEntry1 like someone's name, or something like that.
Basically, how do I find a string within a string. Using Perl this would be a lot easier for me, but I need to do this in VB for other reasons, obviously.
Thanks
-Morg
-
Look up the InStr function. Other useful functions for you will probably be Mid and/or Left. If you look up any one of them, you can easily find info on all of VBs built-in string functions.
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
-
You rock, thanks man :)
I already knew about Left, Right, Mid, etc...
Didn't know the "InStr" function existed. Helps a lot in my program. Thanks again
-Morg