using System.Text.RegularExpressions;
public static void Main()
var regex = new Regex(@"^(?:(?<RName>\n[\w]*)\s+)*$", RegexOptions.Compiled);
var input = "R-abcabc \nR11 abc abc abc \nR20/21/22 abc abc abc \nR34 abc abc abc";
var matches = regex.Matches(input);
foreach(Match match in matches) {
Console.WriteLine(match.Groups["RName"].Value);