I've noticed I've used this one quite often in my code:
def get_between(string, start, end):
return string.split(start)[-1].split(end)[0]
example:
print get_between("blah <a href='http://www.google.com'>blah</a> blah",
"href='", "'>")
>>> http://www.google.com