import re pt re compile text-align left center right justify pt findal

1
2
3
4
5
>>> import re
>>> pt = re.compile(r'text-align: (left|center|right|justify);')
>>> pt.findall("text-align: right;")
['right']
>>>