title: program freezes when processing while loop
body: <p>I am working in a textbook they want me to use .length, .trim, .remove, .insert, .indexof, .substring, like, is not, and a few others.  i have this program working up til the while loop and it freezes.  <strong>Is there another operator that looks at patterns that will work for what i am trying to do(or is there a way to use like and make this work)?  And if so, how do i use it?</strong></p>
  
  <pre><code>Private Sub btnConvert_Click(sender As Object, e As EventArgs) Handles btnConvert.Click
  
      Dim strWord As String
  
      strWord = txtBefore.Text
  
      If strWord.ToUpper.Substring(0, 1) Like "[A,E,I,O,U]" Then
          strWord = strWord.Insert(strWord.Length, "-way")
      ElseIf strWord.ToUpper.Contains("A") Or
          strWord.ToUpper.Contains("E") Or
          strWord.ToUpper.Contains("I") Or
          strWord.ToUpper.Contains("O") Or
          strWord.ToUpper.Contains("U") Then
  
          strWord = strWord.Insert(strWord.Length, "-")
  
          'works up until the while loop
          'program freezes no error
          While strWord.ToUpper.Substring(0, 1) IsNot "[A,E,I,O,U,Y]"
  
              Dim strTemp As String
  
              strTemp = strWord.Substring(0, 1)
              strWord = strWord.Remove(0, 1)
              strWord = strWord.Insert(strWord.Length, strTemp)
          End While
  
          strWord = strWord.Insert(strWord.Length, "ay")
  
      End If
  
      'txtAfter.Text = strWord
  End Sub
  </code></pre>