Skip to content

Instantly share code, notes, and snippets.

@gunsch
Created January 30, 2013 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gunsch/4670703 to your computer and use it in GitHub Desktop.
Save gunsch/4670703 to your computer and use it in GitHub Desktop.
>>> import re
>>> action='Jesse missed three point jumper. Assisted by Daniel.'
>>> re.search(r'^(.*) (missed|made) three point jumper\. (?:Assisted by (.*)\.)?', action).groups()
('Jesse', 'missed', 'Daniel')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment