I know regex isn't the best option for excluding but not sure about other options
I want to replace mobile version of websites, so I want to find and replace the "m." version of websites
https://m.gsmarena.com/sony_xperia_5_iv-price-11838.php
should be
https://gsmarena.com/sony_xperia_5_iv-price-11838.php
However, when I try and find an replace "m." this includes websites like this
https://redfm.ie/
becomes
https://redfie/
which changes the website name.
I am using spyder, and pandas to write this script.
I've tried following the steps in this page (Regular expression to match a line that doesn't contain a word) and the best I have at the moment is
m\.^((?!(\.ie|.com)).)*$
Or to not match when the "m." is followed by .ie or .com, but I'm not having much luck with it
Thanks!