title: Changing substring in a String
body: <p>I've got a variable "Variable" in VBScript that will receive different values, based on names that come from xml files i don't trust. I can't let "Variable" have forbidden caracters on it (&lt;, >, :, ", /, \, |, ?, * ) or characters with accents (I think they are called accent in english) like (Á, á, É, é, Â, â, Ê, ê, ñ, ã).</p>
  
  <p>So, my question is: How can I create a script that studies and replace these possible multiple possible characters in the variable I have? I'm using a Replace function found in MSDN Library, but it won't let me alter many characters in the way I'm using it.</p>
  
  <p>Example:</p>
  
  <p>(Assuming a Node.Text value of "Example A/S")</p>
  
  <pre><code>For Each Node In xmlDoc.SelectNodes("//NameUsedToRenameFile")
       Variable = Node.Text
  Next
  
  Result = Replace(Variable, "&lt;", "-")
  Result = Replace(Variable, "/", "-")
  </code></pre>
  
  <p>WScript.Echo Result
  This Echo above returns me "Example A-S", but if I change my Replaces order, like:</p>
  
  <pre><code>Result = Replace(Variable, "/", "-")
  Result = Replace(Variable, "&lt;", "-")
  </code></pre>
  
  <p>I get a "Example A/S". How should I program it to be prepared to any possible characters? Thanks!</p>