Is it possible to write a query where we get all those characters that could be parsed into int from any given string?
For example we have a string like: \"$%^DDFG
\"$%^DDFG
How about something like this?
var yourstring = "$%^DDFG 6 7 23 1"; var selected = yourstring.ToCharArray().Where(c=> c >= '0' && c <= '9').Take(3); var reduced = yourstring.Where(char.IsDigit).Take(3);