/ Published in: Python
URL: http://stackoverflow.com/questions/839994/extracting-a-url-in-python
Expand |
Embed | Plain Text
import re myString = "This is my tweet check it out http://tinyurl.com/blah" print re.search("(?P<url>https?://[^\s]+)", myString).group("url")
You need to login to post a comment.
