I have the following function:
string str = "1 2 3 4 5"; //string para separar
string[] ArrayValor = str.Split(" ");
//nesse caso o array seria {"1","2","3","4","5"}
But I wanted something more generic, for example, if the user entered "1-2-3-4-5", also wanted the array to return {"1", "2", "3", "4" , "5"}
in short, I want only the numbers of a string, no matter what is between them.