您的位置:首页 > 其它

正则表达式

2016-09-02 15:28 176 查看
提取

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]厅");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: