正则表达式

提取

 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]厅");

 

posted @ 2016-09-02 15:28  老皆知  阅读(181)  评论(0编辑  收藏  举报