Created
November 27, 2012 00:31
-
-
Save cjus/4151625 to your computer and use it in GitHub Desktop.
Parse text between curly braces
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
# src string: Add 2 Arcade Friends within 10 days | |
p = '{Add} {2} {Arcade Friends} {within} {10} {days}' | |
[i.split('{')[-1] for i in p.lower().replace(' ','_').split('}') if '{' in i] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extract the text between curly braces