using System.Collections.Generic;
using System.Text.RegularExpressions;
public static void Main()
string error_message= "{\"2705\":\"Error importing username: 3167763, primary email: pkumar194@google.com, error: User already exists but Email does not match: pkumar194@googlee.com vs pkumar193@google.co.in\",\"10001\":\"Error importing username: 3195330, primary email: alejandra.mejia@google.com, error: User already exists but Email does not match: alejandra.mejia@google.com vs alejandra.mejia@googlee.com\"}";
List<int> list = Regex.Matches(error_message, @"(?<=Error importing username: )\d+")
.Select(match => int.Parse(match.Value))
foreach (int i in list) Console.WriteLine(i);