MySQL query – how to remove variable data

MySQL

I wonder if someone can help me please? I recently migrated from PHPBB forum software to MyBB software, but when the conversion finished I was left with lots of weird characters in many posts, such as <P>, </e>, etc.

I used the below query to remove things like this, and it has worked well and removed lots of these characters:

UPDATE mybb_posts SET message = REPLACE (message, '<P>', '') WHERE message LIKE '%<P>%';

My problem now is that the stuff I need to remove varies from post to post – here's a few examples:

">https://www.ebay.co.uk/itm/SUZUKI-DR-75 ... Sw7k9eIFHa</a><!-- m -->

">http://www.hagon-shocks.co.uk/catalog/c ... x?TypeID=F</a><!-- m -->
">https://www.moorespeedracing.co.uk/indi ... gKQjPD_BwE</a><!-- m -->

As you can see, each line that I need to remove starts and ends with the same group of characters.
I modified the above query using the % as the wildcard, so the query became:

UPDATE mybb_posts SET message = REPLACE (message, '">htt%m -->', '') WHERE message LIKE '%">htt%m -->%';

When I click "Simulate Query" I get a message saying 1643 rows affected, but when I click "Go" to run the query it comes back and tells me 0 rows affected.

Is there something wrong with my query? Can anyone suggest how to fix it or suggest another query to achieve the same outcome?
TIA

Best Answer

Thanks for your replies. The examples of text are shown in my original post, but I had to put the "code" formatting around them as the forum would not let me post without doing that. Here are the examples again:

">https://www.ebay.co.uk/itm/SUZUKI-DR-75 ... Sw7k9eIFHa</a><!-- m -->

">http://www.hagon-shocks.co.uk/catalog/c ... x?TypeID=F</a><!-- m -->
">https://www.moorespeedracing.co.uk/indi ... gKQjPD_BwE</a><!-- m -->

I want to remove this whole section of text, but as you can see the centre section (i.e. the www part) varies in each line. It is MySQL 5.5.65 Sorry, I have no idea how to use "fiddle".