A
akelly_image
Okay, if anyone could toss me some idea's here, please bare with my
noobish questions, I just picked up VB2005 Pro about a week ago. ( no
prior VB at all )
Here's my issue..
I'm pulling information out of a text file and need to pull specific
words out of a string. For example, the text file looks sorta like
this:
[Thu Feb 16 04:43:30 2006] User1 purchased 1 Gumball for ( $100).
[Fri Feb 17 01:00:22 2006] User2 purchased 1 Box of Candy for ( $25).
[Fri Feb 17 18:57:39 2006] User3 purchased 3 Rolls of Paper for (
$100).
I have created text boxes such as date, buyer, item, qty., etc....
if I strip each line and break it into an array it seems to work fine
for populating what I need..
such as
txtBuyer.text = myArray(5)
txtQty.text = myArray(7)
but where I run into problems is the actual items themselves.. since
most of the items in the text file are more than one word, and vary
with each line, I'm sure I can't specify arrays like the other
information.
txt.Item = myArray(8) would work for the first line and populate the
box with "Gumball"
but if I use that for the next line, all I would get is.."Box"
Is there a way to search a string and pull information out from between
keywords ala "get all the words between 'purchased' and 'for' " ? - I
know this seems pretty stupid and I'm probably going about it TOTALLY
the wrong way.. but any feedback would be greatly appreciated.
noobish questions, I just picked up VB2005 Pro about a week ago. ( no
prior VB at all )
Here's my issue..
I'm pulling information out of a text file and need to pull specific
words out of a string. For example, the text file looks sorta like
this:
[Thu Feb 16 04:43:30 2006] User1 purchased 1 Gumball for ( $100).
[Fri Feb 17 01:00:22 2006] User2 purchased 1 Box of Candy for ( $25).
[Fri Feb 17 18:57:39 2006] User3 purchased 3 Rolls of Paper for (
$100).
I have created text boxes such as date, buyer, item, qty., etc....
if I strip each line and break it into an array it seems to work fine
for populating what I need..
such as
txtBuyer.text = myArray(5)
txtQty.text = myArray(7)
but where I run into problems is the actual items themselves.. since
most of the items in the text file are more than one word, and vary
with each line, I'm sure I can't specify arrays like the other
information.
txt.Item = myArray(8) would work for the first line and populate the
box with "Gumball"
but if I use that for the next line, all I would get is.."Box"
Is there a way to search a string and pull information out from between
keywords ala "get all the words between 'purchased' and 'for' " ? - I
know this seems pretty stupid and I'm probably going about it TOTALLY
the wrong way.. but any feedback would be greatly appreciated.