fork(4) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var s = "Allatoona was a town located in extreme southeastern Bartow County, Georgia.";
  8. var m = Regex.Match(s, @"(\S+)\s+County");
  9. if (m.Success)
  10. {
  11. Console.WriteLine(m.Groups[1].Value);
  12. }
  13. }
  14. }
Success #stdin #stdout 0.03s 134208KB
stdin
Standard input is empty
stdout
Bartow