"""
正则表达式的应用，用来判断字符串否符合一定的标准
"""
import re

pat = re.compile("AA")
str = "aasdAAABBAADD"
m = pat.search(str)
m = re.search("asd", str)
m = re.findall("a", str)
m = re.findall("[a-z]", str)

m = re.sub("a", "A", str)  # 在str中用A替换a
print(m)

892095cb4767b11970ad5382e7dc185f5d32294e
<mask token>

<mask token>
print(m)

<mask token>
pat = re.compile('AA')
str = 'aasdAAABBAADD'
m = pat.search(str)
m = re.search('asd', str)
m = re.findall('a', str)
m = re.findall('[a-z]', str)
m = re.sub('a', 'A', str)
print(m)

<mask token>
import re
pat = re.compile('AA')
str = 'aasdAAABBAADD'
m = pat.search(str)
m = re.search('asd', str)
m = re.findall('a', str)
m = re.findall('[a-z]', str)
m = re.sub('a', 'A', str)
print(m)

"""
正则表达式的应用，用来判断字符串否符合一定的标准
"""
import re

pat = re.compile("AA")
str = "aasdAAABBAADD"
m = pat.search(str)
m = re.search("asd", str)
m = re.findall("a", str)
m = re.findall("[a-z]", str)

m = re.sub("a", "A", str)  # 在str中用A替换a
print(m)
