title: Replace variable string in VBA
body: <p>I need to replace somethin in a string, but what to replace may vary. It can be</p>
  
  <pre><code>XY - test
  XXxY-test
  XXyyXx-TEST
  yXyy     -Test
  </code></pre>
  
  <p>and virtually any other combination of whitespaces and cases of the above.</p>
  
  <p>I need to replace the "-test" part and leave the "XXX" alone. So, when using a simple replace</p>
  
  <pre><code>Replace("XXX  -test", "- test", "")
  </code></pre>
  
  <p>It won't work, obviously. So I need a more sophisticated version of Replace that could handle this task. Is there something I could use or do I have to write it on my own?</p>