-
December 19th, 2007, 09:36 PM
#1
Member
Formatting a file in VB
I've been working on a project for a few days now and everytime it looks like I'm getting somewhere I hit a dead end. First let me explain the problem.
The general problem is that I have a file that I need to search through for a specific part. IE. Part 0 2, once that part is found I need to scan the components of that part for a specific component number. IE. COMP 4.
If that component is found, I need to remove it.
Sounds pretty easy so far eh?
Well here is where I get tripped up. I have two files that look like the following:
Main (this is the one being searched for the part number)
Code:
PART 0 1
COMP 3
COMP 5
COMP 6
PART 0 2
COMP 1
COMP 2
COMP 4
PART 0 3
COMP 98
COMP 99
Parts (this contains the search criteria)
Code:
PART 0 1 COMP 5
PART 0 1 COMP 6
PART 0 2 COMP 4
PART 0 3 COMP 99
What I have tried to do was basically get the PART number, run through the main file looking for that part number, then once its found search for the COMP number and remove it. I ran into so problems with that and abandoned it for now.
Now I thought I would scan through the main document, copy an entire PART section to a list, scan that list for component numbers and do a list.remove, then write them to a new file. However, I can't seem to get there with this idea, I don't know how to basically run the list against the Parts file successfully.
If any of you can think of a better way to do this, or even just help me with one of my ideas I'd much appreciate it. When I first took on this project it seemed straight forward and easy, but looks tend to be decieving.
Thanks guys
/phalse
Similar Threads
-
By Tiger Shark in forum The Security Tutorials Forum
Replies: 3
Last Post: January 12th, 2007, 10:44 PM
-
By Tedob1 in forum Other Tutorials Forum
Replies: 4
Last Post: October 15th, 2004, 06:31 AM
-
By gore in forum Operating Systems
Replies: 3
Last Post: March 7th, 2004, 08:02 AM
-
By R0n1n in forum *nix Security Discussions
Replies: 3
Last Post: November 20th, 2002, 02:20 PM
-
By Gbin@ryR in forum AntiOnline's General Chit Chat
Replies: 8
Last Post: February 28th, 2002, 05:52 PM
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
|
|