正则表达式

提取

 Regex rg = new Regex(@"[0-9]室[0-9]厅|[0-9]居室");
                                string sOriRoomType = rg.Match(sTitle).Value;

                                Regex rgm = new Regex(@"[0-9]+平米");
                                string sArea = rgm.Match(sTitle).Value.Replace("平米","");

                                Regex rgroom = new Regex(@"[0-9]室|[0-9]居室");
                                string sRoom = rgroom.Match(sOriRoomType).Value.Replace("居室", "").Replace("", "");

                                Regex rgHall = new Regex(@"[0-9]厅");
原文地址:https://www.cnblogs.com/zhangji/p/5833675.html