Skip to content

Instantly share code, notes, and snippets.

@ZhouYang1993
Created April 19, 2020 22:14
Show Gist options
  • Save ZhouYang1993/2588aef81485ecc0f5decf24f27d92ab to your computer and use it in GitHub Desktop.
Save ZhouYang1993/2588aef81485ecc0f5decf24f27d92ab to your computer and use it in GitHub Desktop.
regex in Python
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