> > Use Regex.Split.
>
> Duh???
Which part didn't you understand? In the RegEx class, there's a Split
method. Construct an appropriate regex, and call the Split method.
As Pavel mentioned, String also now contains an overload for
String.Split which takes an array of delimiter strings instead of
chars. It's "new" to 2.0, but hopefully that won't be an issue for
you.
Jon
Nicholas Paldino [.NET/C# MVP] - 30 Jul 2008 18:18 GMT
haha, he was talking about himself I believe. As in "Duh, why didn't I
figure that out"

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
On Jul 30, 3:55 pm, CSharper <cshar...@gmx.com> wrote:
> > Use Regex.Split.
>
> Duh???
Which part didn't you understand? In the RegEx class, there's a Split
method. Construct an appropriate regex, and call the Split method.
As Pavel mentioned, String also now contains an overload for
String.Split which takes an array of delimiter strings instead of
chars. It's "new" to 2.0, but hopefully that won't be an issue for
you.
Jon
Jon Skeet [C# MVP] - 30 Jul 2008 19:22 GMT
> haha, he was talking about himself I believe. As in "Duh, why didn't I
> figure that out"
Ah, that would explain it :)

Signature
Jon Skeet - <skeet@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Maxwell - 30 Jul 2008 20:28 GMT
I actually used this functionality quite heavily recently, to narrow in on
an encoded url in a webpage source. I split the string after a "<td
id=\"...\">" element, or something similar, that occurred once and was
unique, and took the second part.
Then I took the first part of the split at "</td>".
Then I took the second part of "<a href=\"".
Then I took the first part of ">".
On Jul 30, 3:55 pm, CSharper <cshar...@gmx.com> wrote:
> > Use Regex.Split.
>
> Duh???
Which part didn't you understand? In the RegEx class, there's a Split
method. Construct an appropriate regex, and call the Split method.
As Pavel mentioned, String also now contains an overload for
String.Split which takes an array of delimiter strings instead of
chars. It's "new" to 2.0, but hopefully that won't be an issue for
you.
Jon