title: Replace all strings in file, using wildcards in the substitution
body: <p>I'm using sed in bash to try replace all strings matching:</p>
  
  <pre><code>compile 'com.test.*:*'
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>compile 'com.test.*:+'
  </code></pre>
  
  <p>Where * is a wildcard.</p>
  
  <p>My file looks like this, it's called moo.txt:</p>
  
  <pre><code>compile 'com.test.common:4.0.1'
  compile 'com.test.streaming:5.0.10'
  compile 'com.test.ui:1.0.7'
  </code></pre>
  
  <p>and I want it to look like this:</p>
  
  <pre><code>compile 'com.test.common:+'
  compile 'com.test.streaming:+'
  compile 'com.test.ui:+'
  </code></pre>
  
  <p>I've tried to use sed like:</p>
  
  <pre><code>sed -i -- "s/compile \'com.test.*:.*\'/compile \'com.test.*:+\'/g" moo.txt
  </code></pre>
  
  <p>But this makes the file look like:</p>
  
  <pre><code>compile 'com.test.*:+'
  compile 'com.test.*:+'
  compile 'com.test.*:+'
  </code></pre>
  
  <p>Any ideas how to use the wildcard in the substitute field properly?</p>