title: replace function with parameters as string array
body: <p>well ,I have text file contain these string <code>666 66 55 333 55</code> for example and I have two arrays of string one of them contains the string in text file without repetitions and the other values from 1 to array1 size I need to replace each string in text file for example if <code>array1 = {666,66,333,55}</code>  <code>array2</code> will be <code>{1,2,3,4}</code>   text file should be like that <code>(1 2 4 3 4 )</code> i try this code the problem with it is replace <code>66</code> by <code>1</code> and <code>666</code> become <code>16</code> ,so it consider <code>66</code> as part of <code>666</code> I need away to get over-this,it good to know that this code work in other cases I mean <code>55</code> in text file become <code>4</code> and <code>333</code> become <code>3</code>.</p>
  
  <pre><code>      stra() as string={666,66,333,55}
         stra2()as string={1,2,3,4}
      For j = 0 To stra.GetLength(0)
  
          Const ForReading = 1
          Const ForWriting = 2
  
          Dim objFSO = CreateObject("Scripting.FileSystemObject")
          Dim objFile = objFSO.OpenTextFile(OpenFileDialog1.FileName, ForReading)
  
          Dim strText = objFile.ReadAll
  
          objFile.Close()
          Dim strNewText = Regex.Replace(strText, stra(j), stra2(j))
  
          objFile = objFSO.OpenTextFile(OpenFileDialog1.FileName, ForWriting)
          objFile.WriteLine(strNewText)
          objFile.Close()
      Next
  </code></pre>