I need take first number from the string, for example
"12345 this is a number " => "12345"
"123 <br /> this is also numb 2" => "123"
etc.
for that I use C# code:
string number = "";
foreach(char c in ebayOrderId)
{
if (char.IsDigit(c))
{
number += c;
}
else
{
break;
}
}
return number;
How is it possible to do same via LINQ ?
Thanks!
Take(1)"some value 123 <br /> this is also numb 2"should produce123or error?