I want to replace all URLs that start with https://oneweburl.com/cm with https://anotherwebsite.com
i.e. URLs such as
https://oneweburl.com/cm/9304/434
https://oneweburl.com/cm/849/495/34
https://oneweburl.com/cm/2994/234/54
will be replaced with only https://anotherwebsite.com. So far I have tried
update wp_posts
set post_content =
replace(post_content, 'https://oneweburl.com/cm/%', 'https://anotherwebsite.com');
Apparently that didn't work. Any idea the SQL to accomplish this? Thanks!