杨钦元 博客

正则表达式的写法

rule = r'abc' # r prefix, the rule you want to check in a given string 
print re.findall(rule,"aaaaabcaaaaaabcaa") # return ['abc', 'abc']