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