Need suggestion for .NET regular expression to get SMS infomation from SIM900 GSM modem
===

I try to get information from string that return from AT+CMGR=X (where x is index of message on SIM Card)

the string is 

    \r\n+CMGR: \"REC UNREAD\",\"TrueID/TMN\",\"\",\"12/07/24,14:48:11+07\"
    \r\n
    003400310036003000300037003800350035003A0E170E230E390E210E310E190E190E35
    0E4800200041002F00430020003000380030003900350037003200360036003800200E220E2D
    0E140E400E070E340E190E040E070E400E2B0E250E370E2D002000340030002E0030003000200E1A0E320E17
    \r\n\r\n
    OK\r\n

There are useful information in this string.

REC READ for message status
Date for SMS
Content of SMS
OK message

and know that we can pull this info with .NET Regular group.

I found the useful thread but I cannot adjust pattern in that thread to be correct pattern that fit my string.

 

    String pattern = @"(?<a>\+CMGL):[ ](\d*),\""
                             (?<b>[^\""]*)"",
                             (?<c>\d*),(?<d>\d*),\""
                             (?<e>\+\d*)"",(?<f>\d*),\""
                             (?<g>\d*\/\d*\/\d*,\d{2}:\d{2}:\d{2}\-\d{2})\"",\""
                             (?<h>\d{2}\/\d{2}\/\d{2}),?\r\n,?
                             (?<i>\d{2}:\d{2}:\d{2}\-\d{2})\"",
                             (?<j>\d*)";

        Regex rx = new Regex(pattern, RegexOptions.IgnorePatternWhitespace);
        Match m = rx.Match(testWord);
        while (m.Success)
        {
            Console.WriteLine(m.Groups["a"].Value);
            Console.WriteLine(m.Groups["b"].Value);
            Console.WriteLine(m.Groups["c"].Value);
            Console.WriteLine(m.Groups["d"].Value);
            Console.WriteLine(m.Groups["e"].Value);
            Console.WriteLine(m.Groups["f"].Value);
            Console.WriteLine(m.Groups["g"].Value);
            Console.WriteLine(m.Groups["h"].Value);
            Console.WriteLine(m.Groups["i"].Value);
            Console.WriteLine(m.Groups["j"].Value);
            Console.WriteLine("");
            m = m.NextMatch();
        }
        Console.ReadLine();
    }

from [http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/d652b20d-471c-4640-967c-b5fe71e3a42c/][1]


Thank you very much.

  [1]: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/d652b20d-471c-4640-967c-b5fe71e3a42c/