|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|||
|
Parsing Strings
I currently have some text in a multiline textbox, how can the the following code be adapted to parse characters 3 to 8 on line 1 of the textbox. Then characters 2 to 6 on line to of the text box, and store both extracted strings in two separate variables.
The following code extracts from line 1 then store the extracted string inside sMidText Many Thanks, Last edited by Nilpo : February 8th, 2007 at 01:18 AM. |
|
|
|||||
|
Basically, you use the Split function to separate your string at newline characters. This results in an array containing one substring for each line. You finish up by parsing each line for the requested characters with the Mid function.
vb Code:
__________________
Click the image if at any point you don't like my decision.10011100011000101111100011100000011000000100000011 10010011011110110001101101011011110100011000001110 0100111101000100001 Visit Nilpo.com and Ask the Windows Guru! Open me for some very useful links!
![]() Last edited by Nilpo : February 8th, 2007 at 12:47 AM. |
|
|||
|
Quote:
Many Thanks, |
|
|||
|
I currently have the following information a text box:
Date: 12/12/06 Name: Bill Age: 19 How can the data after each field be extracted, and store in a text file. To result in the text file containing only (12/12/06, Bill, 19 etc) The data after the fields changes i.e. (12/12/06, Bill, 19 etc). |
|
|
||||
|
Quote:
|
|
|||
|
Quote:
Many Thanks, much appreciated |