|
-
Nov 3rd, 1999, 10:26 PM
#1
Thread Starter
Member
I'm getting some data returned to me that looks like this:
Code:
F:c:\myfile.ext M:300 T:654654065 120 TEST Y:EXT
Each uppercase letter combined with a ':' represents a different field. Is there an easy way to extract these field values and put them in a format like this:
Code:
Filename: c:\myfile.ext
Number: 300
Value: 654654065 120 TEST
etc...
There must be an easy way to get those values but I don't know how. Thanks for your help!
-
Nov 3rd, 1999, 10:37 PM
#2
Frenzied Member
here's one method:
mystring = "F:c:\myfile.ext M:300 T:654654065 120 TEST Y:EXT"
Filename = Trim(Mid(mystring, 2, InStr(mystring, "M:") - 2))
mystring = Mid(mystring, Len(Filename))
Number = Trim(Mid(mystring, 2, InStr(mystring, "T:") - 2))
mystring = Mid(mystring, Len(Number))
Value: = Trim (Mid(mystring, 2, InStr(mystring, "Y:") - 2))
etc....
this may need tweeking a bit
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
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
|