Guest User

Untitled

a guest
Jan 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. >>> p = re.compile(r'[0-9]*')
  2.  
  3. # This works as expected:
  4. >>> p.search('7').group()
  5. '7'
  6.  
  7. # But this does not:
  8. >>> p.search('foo 7').group()
  9. ''
Add Comment
Please, Sign In to add comment