Skip to content

Instantly share code, notes, and snippets.

@managai
Created November 15, 2011 16:34
Show Gist options
  • Save managai/1367517 to your computer and use it in GitHub Desktop.
Save managai/1367517 to your computer and use it in GitHub Desktop.
(python) extract substring between two symbols
myString="Hello there !bob@"
mySubString=myString[myString.find("!")+1:myString.find("@")]
print mySubString
## extract text between ! and @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment