Tokenizing

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
C

Craig Buchanan

I'm trying to extract the key/value pairs string like this:

[Status]
CurrTime = 1200
LastPlayQUpdate = 400
CurrVolume = -10
[End Status]

My first instinct is to use a regular expression to match values before and
after the '=', but there probably is a more efficient method.

Can anyone suggest a better approach?

Thanks,

Craig Buchanan
 
Dim strPairs() As String = Split(line, "=")

You could load the text file (I guess i am assuming this is where the
data is from) line by line and extract the pairs.
 
Back
Top