parser problem with fields

  • Thread starter Thread starter martin.zugec
  • Start date Start date
M

martin.zugec

Hello,

when using parser (TextFieldParser), is there any way to specify "and
rest"?

Something like tokens=1,2,* (first, second, rest)?

What I mean exactly:
I have ini files with content that is not in my control. Delimiter is
"=".
It is working as expected - if there is TestParam=1 then fields(0) =
TestParam and fields(1) = 1.

Problem can occure if you will have multiple delimiters:
TestParam=1=5. In that case Value TestParam = 1.

Currently I got workaround written like this:
For i As Integer = 1 To
fields.Length - 1
If i <> 1 Then Value =
Value & parser.Delimiters(0)
Value = Value & fields(i)
Next

Is there any better approach???

Thanks,
Martin
 
Would you like to post more matrial about Parser . i gues that is a
mini part of compiler .

I am wating for your pleasure
 
Back
Top