title: How to Use Regexp in MySQL Replace Commands?
body: <p>My goal is to replace the links in the database with a catchall link. I generally use the REPLACE command for replacing string in the database, but this time I am having difficulty because in order to find the links I need to use regular expressions, and that is simply not working out:</p>
  
  <pre><code>UPDATE node_revisions SET body = REPLACE ( `body` , 'http://.*.\pdf', '/migration-update' );
  
  UPDATE node_revisions SET teaser = REPLACE ( `teaser` ,  'http://.*pdf', '/migration-update' );
  </code></pre>
  
  <p>These two queries just fall flat. </p>
  
  <p>What needs to be done here in this situation?</p>