using System.Text.RegularExpressions;
using System.Collections.Generic;
public static void Main()
String input = "one two three #abc four five six #xyz";
var results = new List<string>();
Regex regex = new Regex(@"([\s*\w]+ #\w+)");
var matches = regex.Matches(input);
foreach (var match in matches)
results.Add(match.ToString());
Console.WriteLine(String.Join(",", results));