Guest User

Untitled

a guest
Feb 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. my_str ='·in this match, dated may 1, 2013 (the "the match") is between brooklyn centenniel, resident of detroit, michigan ("champion") and kamil kubaru, the challenger from alexandria, virginia ("underdog").'
  2.  
  3. champion = re.findall(r'("champion"[^.]*.)', my_str)
  4. print(champion)
  5.  
  6. >> ['"champion") and kamil kubaru, the challenger from alexandria, virginia ("underdog").']
  7.  
  8.  
  9. underdog = re.findall(r'("underdog"[^.]*.)', my_str)
  10. print(underdog)
  11.  
  12. >>['"underdog").']
  13.  
  14. brooklyn centenniel, resident of detroit, michigan
Add Comment
Please, Sign In to add comment