I need to use python to match url in my text file. However, there is a special case:
i like pic.twitter.com/Sex8JaP5w5/a7htvq
In this case I would like to keep the emoji next to the url and just match the url in the middle.
Ideally, I would like to have result like this:
i like <url>
Since I am new to this, this is what I have so far.
pattern = re.compile("([:///a-zA-Z////\.])+(.com)+([:///a-zA-Z////\.])")
but the return result is something unsatisfied like this:
i like <url>Sex8JaP5w5/a7htvq
Would you please help me with this? Thank you so much