摘要:
re.match re.match 尝试从字符串的开始匹配一个模式,如:下面的例子匹配第一个单词。 import re text = "JGood is a handsome boy, he is cool, clever, and so on..." m = re.match(r"(\w+)\s", text) if m: print m.group(0), '\n', m.group(1) else: print 'not match' import re text = "JGood is a handsom 阅读全文
posted @ 2013-05-18 21:41
future2012lg
阅读(283)
评论(0)
推荐(0)
浙公网安备 33010602011771号