代码示例:(标识:python_regex_match)
python_regex_match.py
import re

str = "China is a great country"
x = re.search("a", str)
print(x) #this will print an object
运行结果: