mamin@o2.pl =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2:
[quoted text, click to view] > Hi all,
> Anyone know some smart way to get two first substrings from string, in
> example how to get string
> "aaaa bbbb" from string "aaaa bbbb cccc ddddddd"?
string str =3D "aaaa bbbb cccc ddddddd";
System.Text.RegularExpressions.Regex re =3D new
System.Text.RegularExpressions.Regex(@"^\w+\s+\w+\b");
System.Text.RegularExpressions.Match match =3D re.Match(str);
if (match.Success)
{
string res =3D match.Value;
//...........
}