編制一個正則表達式的模版
然后模版可以用match()和search()方法來匹配
prog = re.compile(pattern)
result = prog.match(string)
這種方法等價于result = re.match(pattern,string)
如果這個模版反復用的話是有價值的,
我建議還是用re.search()把pattern作為單獨的字符串
另外pattern里建議用(?P<capacity>[\u4e00-\u9fa5]{2,5})定位
另外,ur"abcd",ur的表示方法在python3(用u替代了)中不在使用,
同時也說明初代的jieba是基于python2的