Created
April 19, 2020 22:14
-
-
Save ZhouYang1993/2588aef81485ecc0f5decf24f27d92ab to your computer and use it in GitHub Desktop.
regex in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
re.match(r'\d{5}','12345') | |
# <_sre.SRE_Match object; span=(0, 5), match='12345'> | |
re.match(r'\d{5}','1234') | |
# None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment