title: Update Wordpress database, change post_content hardcoded URLs
body: <p>I am not a huge expert in MYSQL nor Regex (I guess I need to use some here), I would appreciate any help.
  So my problem is that I would like to change some hardcoded URLs in Wordpress post contents to different ones.</p>
  
  <p>Here is an example of a URL:</p>
  
  <p><a href="http://cdn1.domain.com/wp-content/uploads/2017/05/16211742/Screenshot_051117_101304_AM.jpg" rel="nofollow noreferrer">http://cdn1.domain.com/wp-content/uploads/2017/05/16211742/Screenshot_051117_101304_AM.jpg</a></p>
  
  <p>Now, 'cdn1' can be cdn, cdn1 or cdn2. We might need to run 3 queries, but that is not a problem.</p>
  
  <p>I would like to change all instances of this to:</p>
  
  <p>//domain.com/wp-content/uploads/2017/05/16211742/Screenshot_051117_101304_AM.jpg</p>
  
  <p>So basically remove the cdn (cdn, cdn1, cdn2) part, and remove the timestamp URL part before the filename.</p>
  
  <p>The Wordpress database is something like this:</p>
  
  <p>UPDATE wp_posts
  SET post_content = 
  WHERE </p>
  
  <p>Thank you very much!</p>