Here's an example of a brute force method.... it takes your input string (your file) and gives you each word between quotes until it returns 0 :-
SuperStrict
Function GetNextWord:Int( inString:String, pos:Int Var, outString:String Var )
Local state:Int = 0 ' 0=not begun, 1=begun copying, 2 = complete
outString = ""
While (pos <= inString.length) And (state < 2)
Select state
Case 0
If inString[pos] = Asc("~q")
state :+ 1
EndIf
Case 1
If inString[pos] = Asc("~q")
state :+ 1
Else
outString :+ Chr(inString[pos])
EndIf
EndSelect
pos :+ 1
Wend
Return (state = 2)
EndFunction
Local s:String = "~qfield1~q, ~qfield2~q, ~qfield3~q ~qetc.~q"
Local pos:Int = 0
Local outString:String
While GetNextWord( s, pos, outString )
Print outString
Wend
|