Lam,
Is your delimiter the space character? If so, you can just call the
Split method, like so:
// Split on the space character.
// Assume val stores the string.
string[] strings = val.Split(new char[]{' ', '\t'}, false);
In .NET 2.0, it should be noted that false should be replaced with
StringSplitOptions.None (the overload with the boolean parameter is marked
as obsolete).
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Lam" <ja**********@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP14.phx.gbl...
I am new to c# and I am not sure how to use regular expression
I have the line like this
"C 07/18/05 12:01 18002236481 00:04:01 805 130"
how can I put each one into different string variables?
maybe you can give me some hints ?
Thanks a lot
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:eU**************@TK2MSFTNGP10.phx.gbl... Lam,
If you have just one character that you can split the string on, just
use the Split method on the string instance. If you have more complex
tokenization requirements, then use a regular expression.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Lam" <ja**********@hotmail.com> wrote in message
news:Oz**************@TK2MSFTNGP09.phx.gbl... > Hi
> I try to read in a line from text file, and how can I tokenize the
> line?
>
> Thanks
>
>