title: sed find and replace a string with spaces
body: <p>Having the following in a file:</p>
  
  <pre><code>public $password = 'XYZ';
  </code></pre>
  
  <p>I'm trying to replace the password's value with a different one, through an automated deployment process from backup files.</p>
  
  <p>I have the regext that will match the string above in a file, but not much compatible with <code>sed</code></p>
  
  <pre><code>(public\s\$password\s=\s'(.*)'?)
  </code></pre>
  
  <p>I also tried</p>
  
  <pre><code>sed -i -e "s/public\s\$password\s=\s'(.*)'/private\s\$password\s=\s'jingle'" configuration.php
  </code></pre>
  
  <p>Any ideas?</p>