[tt]
MID$()[/tt] is fairly easy to use. You tell it where you want it to start in the string and how many characters you want it to grab. The more difficult part is determining where you want to start and how many characters you want
A good approach for this is the [tt]
INSTR()[/tt] function. It takes either 2 or 3 parameters. Unusually, it is the first parameter which is optional

In its two-parameter form, INSTR takes a string and a substring (in that order), and returns the offset into the string of the first occurrance of the substring, or 0 if it does not occur. In its second form, a third parameter is added in front of the other two, which is where in the string to start looking. The following code outputs the offset of each space in the input string:
[tt]
LINE INPUT "Enter a string: ", a$
x% =
INSTR(a$, " "
IF x% = 0
THEN
PRINT "There are no spaces in that string."
ELSE
PRINT "Spaces are at locations:"
DO
PRINT x%;
x% =
INSTR(x% + 1, a$, " "
LOOP WHILE x% <> 0
END IF
[/tt]
I'm sure you can adapt this to fit your needs.
