Metacharacter introduction:
This is a metacharacter table that you can also use to learn regular expressions:
Understanding the relationship between metacharacters and escape characters
I saw a sentence in the book:
The purpose of this article is to give you a deeper understanding of this sentence, please see the following analysis:
Operator:
The above is my personal understanding, I hope it can help you, and I welcome refutation.
and also
tel = '''00-111,11-222,22-333'''
pattern = re.compile(r'(\d{2})-(\d{3})')
print(pattern.findall(tel))
pattern = re.compile(r'\d{2}-\d{3}')
print(pattern.findall(tel))
Can anyone explain why the two pieces of code return different, why the above can return, I think it does not match