using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)";
string input = @"1.3626104100298,44.0313777738606,0 -121.3627743244628,44.03123252081081,0 -121.3627794325398,44.03122812311533,0 -121.3627843389654,44.03122393122449,0 -121.3627892667884,44.0312197526747,0 -121.3627942147613,44.0312155874754,0 -121.3627991841185,44.03121143471726,0 -121.3628041748603,44.03120729440029,0 -121.3628091845174,44.03120316834296,0 -121.3628142168063,44.03119905471752,0 -121.3628192704925,44.0311949544332,0 -121.3628243430812,44.03119086750853,0 -121.3628294370801,44.03118679482493,0 -121.362834551216,44.0311827345917,0 -121.3628396867492,44.03117868769964,0 -121.3628448411978,44.03117465506718,0 -121.3628500170308,44.03117063487584,0 -121.3621653794692,44.03071984342947,0 -121.3619768731163,44.03100429635388,0 -121.3626104100298,44.0313777738606,0";
Match m = Regex.Match(input, pattern);
Console.WriteLine("'{0}' found at index {1}", m.Value, m.Index);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx