title: Wordpress WP-CLI search-replace syntax for URLs
body: <p>I want to change this sentence:</p>
  
  <pre><code>&lt;iframe width="850" height="478" src="https://www.youtube.com/embed/4zH9Zca1vRM" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>https://www.youtu.be/4zH9Zca1vRM
  </code></pre>
  
  <p>I can do it for every iframe of youtube video in the database. What is the right sentence for do it? I gess something like this:</p>
  
  <p><strong>step 1</strong>. Replacing first part:</p>
  
  <pre><code>wp search-replace '&lt;iframe width="*" height="*" src="https://www.youtube.com/embed/' 'https://www.youtu.be/'  --regex
  </code></pre>
  
  <p><strong>step 2</strong>. Replacing last part:</p>
  
  <pre><code>wp search-replace '" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;' ''  --regex
  </code></pre>
  
  <p>Is it right? I'm not sure about quotes and wildcards.</p>
  
  <p>Thank you!</p>