fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var str = @"<point srsName=""EPSG:4326(WGS84)"">
  9. <coordinates>121.7725934555,25.1508396138</coordinates>";
  10. var m = Regex.Match(str, "<coordinates>([^,]+),([^<]+)</coordinates>");
  11. Console.WriteLine("'{0}' '{1}'", m.Groups[1], m.Groups[2]);
  12. }
  13. }
Success #stdin #stdout 0.07s 34136KB
stdin
Standard input is empty
stdout
'121.7725934555' '25.1508396138'