No i don't :(
Main Topics
Browse All TopicsHow can i do the following in visual basic v6?
Open a .txt file ( e.g c:\test.txt )
Start searching for the string <a href=" from the top of the .txt file
If found on .txt file then grab it from <a href=" until the character > appears. ( I need to get the urls back to my visual basic project.
Continue searching for onothers until you reach the end of the .txt file
.txt file example
------------------
Here is some random text..... random text
random text... <a href="http://www.experts-e
Random text....
RandomText -- Random Text /// <a href="http://www.google.co
------------------
On the example i have to get "http://www.experts-exchan
Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
ok, let's start to read a file, line by line:
http://www.dreamincode.net
This is the sample of the sort of code you need.
1. Create a new project .
2. Add a form as showing in the attached diagrams 9the font size of text on the form is to be
"Tahoma Regular 12"
3. Double click on the form once it is created and add the following code (showing below)
4. Add modules to your project as showing in the NEXT comment
Note! This code will not "span" lines (i.e. will not find lines where the starting text is on one line, and the ending text is on another line). Will leave it up to your intelligence to modify the code to do that (it's tricky but will be fun to solve).
This code will fully documented (as all good code should be) . Its functionality is to search a file and display all the occurrences of certain text in a file to the user (by placing it in a listbox)
The main function here is "CKRFindInFile" which is a function I wrote.
It searches a file line by line and finds if there is an occurrence of text STARTING with
"something" and ENDING with "something".
(By the way, ALL functions I have written myself start with CKR (my initials)...Vanity I suppose :-)
So all you really need to do in your OWN project is make use of the array CKRFindInFile!
Hope this a learning experience for you and solves your problem as well.... :-)
And now the modules to be added to your project as per the attached diagram.
The modules all appear together in the attached code snipett. They will need to be seperated and placed in their own module files (.bas files) within the project. (as per attached diagram)
Have fun....I still think Visual Basic is a fun way to program! :-)
Carol2009,
I have pointed out to the administrator that although the code has now become "unhidden" they have not restored the screen images I had attached. (There are 11 of them!)
I have asked then to rectify this, but if they can't I will have to attach them again.
Let's just see if they can "unhide" the 11 images. (fingers crossed...it takes ages to attach 11 files with comments....sigh!)
Business Accounts
Answer for Membership
by: angelIIIPosted on 2009-09-06 at 22:33:31ID: 25272844
I presume the same answer as your other question can be used: e.com/Prog ramming/La nguages/ Vi sual_Basic /Q_2470969 1.html
http://www.experts-exchang
I presume you know how to read a .txt file?