📜  python re search print - Python代码示例

📅  最后修改于: 2022-03-11 14:47:13.956000             🧑  作者: Mango

代码示例2
>>> import re
>>> reg = re.compile("[a-z]+8?")
>>> str = "ccc8"
>>> print(reg.match(str).group()) #use group() to print the matches
ccc8