using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
publicclass MainClass{
publicstaticlong CountLinesInStringSlow(string text)
{
Regex reg = new Regex("\n", RegexOptions.Multiline);
MatchCollection mat = reg.Matches(text);
return mat.Count + 1;
}
}