Python

正则表达式

2017-05-26  本文已影响1人  踏云小子

eg:

web_cate_url_path = '/deals/xbox-one-games/'
match_obj = re.match(r'^\/deals\/(.*)?\/', web_cate_url_path)
        if match_obj:
            web_cate_url_name = match_obj.group(1)
上一篇 下一篇

猜你喜欢

热点阅读