Firstly, ignore the newlines - or better, dispose of them using string.replace, then work on that ('\n' is not necessarily what you think, and Regexes don't work well with them):
string inp = @"REL LOCK OPEN\r\n+CMGS: 67\r\n\r\nOK\r\n";
inp = inp.Replace(@"\r\n", @"$");
Match m = Regex.Match(inp, @"(.+)\$\+CMGS: (\d+)\$\$(.+)\$");
if (m.Success)
{
Console.WriteLine(m.Value);
foreach (Group g in m.Groups)
{
Console.WriteLine(" {0}", g.Value);
}
}
Will generate:
REL LOCK OPEN$+CMGS: 67$$OK$
REL LOCK OPEN$+CMGS: 67$$OK$
REL LOCK OPEN
67
OK
Which you should be able to work with.