|
-
Jul 1st, 2002, 04:47 PM
#1
Thread Starter
Fanatic Member
Find a string in textfile?
ok, I've done some work with sendmessage API and have figured out how to solve my problem. However, in order to do this I need to do the following. I have a text file that has multiple lines. Each line looks something like this:
Bob Jones ~ 28 ~ Engineer ~ Target
I use sendmessage to compare the information in my listview to another source. If the file is not found in the listview, then it is added from the other source via the textfile. Then the textfile is used to repopulate the listview. If a file is found in the listview, but not in the other source then it needs to be removed. So, I need to remove that line from my textfile. So my question is:
I need to search the first column of my textfile (where Bob Jones appears in my example above) and compare it to a string. If they are the same, then I want to remove that entire line from my textfile. There is not a problem with this, because there can't be duplicates (ie. two Bob Jones' in the first column). Any help with this is appreciated. Thanks
-Jeremy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|