Created
February 23, 2014 03:07
-
-
Save v/9166246 to your computer and use it in GitHub Desktop.
Regex example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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