fork download
  1. import re
  2.  
  3. regex = r"https?://myhost\.mydomain\.(?:com|io)/\S*?(https?://myhost\.mydomain\.(?:com|io)/\S*\.(?:jpe?g|png))"
  4. test_str = ("https://m...content-available-to-author-only...n.com/pnLVyL7HjrxMlxjBQkhcOMr2WUs=/400x400/https://m...content-available-to-author-only...n.com/images/98f9a734-52e2-4616-adf7-bf0165bbf738.png")
  5.  
  6. matches = re.search(regex, test_str)
  7.  
  8. if matches:
  9. print(matches.group(1))
Success #stdin #stdout 0.03s 9496KB
stdin
Standard input is empty
stdout
https://m...content-available-to-author-only...n.com/images/98f9a734-52e2-4616-adf7-bf0165bbf738.png