con C# e Regex Ho una situazione strana:Regex MatchCollection ottiene troppi risultati
string substr = "9074552545,9075420530,9075662235,9075662236,9075952311,9076246645";
MatchCollection collection = Regex.Matches(substr, @"[\d]*");
Nel mio mondo sopra mi avrebbe dato un risultato in 'collezione' che contiene 6 risultati. Stranamente la mia collezione contiene 12 risultati e ogni secondo risultato è {} (vuoto).
ho cercato riscrittura a:
string substr = "9074552545,9075420530,9075662235,9075662236,9075952311,9076246645";
Regex regex = new Regex(@"[\d]*");
MatchCollection collection = regex.Matches(substr);
ma mi dà lo stesso risultato esatto. Cosa mi manca qui?
Sto usando NET Framework 4.5, C#
salvato la mia giornata! Grazie p.s.w.g :-) – olf