import re str=\"x8f8dL:s://www.qqq.zzz/iziv8ds8f8.dafidsao.dsfsi\" str2=re.match(\"[a-zA-Z]*//([a-zA-Z]*)\",str) print str2.group() current result=> error expec
print re.sub(r"[.]","",re.search(r"(?<=//).*?(?=/)",str).group(0))
See this demo.