using System.Text.RegularExpressions;
public static void SplitString(string text)
MatchCollection matches = Regex.Matches(text, @"@Q(.*?)@E", RegexOptions.Singleline);
foreach (Match match in matches)
foreach (Capture capture in match.Captures)
Console.WriteLine(capture + "\n");
public static void Main()
string text = @"*this is a comment line
*comment lines should be rejected
This is the first question. What is your answer?
This is question two. Give me an answer please?