Skip to content

Instantly share code, notes, and snippets.

@v
Created February 23, 2014 03:07
Show Gist options
  • Save v/9166246 to your computer and use it in GitHub Desktop.
Save v/9166246 to your computer and use it in GitHub Desktop.
Regex example
import re
input = 'vaibhav2614 #ruhack: hello there aiden'
expression = '(.+)\s+#(.+): (.+)'
output = re.search(expression, input)
print output.group(0)
print output.group(1)
print output.group(2)
print output.group(3)
import pdb; pdb.set_trace();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment