cat piped to grep can check to see if a line of text contains a string. the sed command is more suited for editing files. Sed is a good utility to modify text. Sed is good at deleting strings and also substituing one string for an other.
Since the forward slash has special meaning, you need to escape it. By placing a backslash in front of the forward slash, all of the special meaning is removed(escaped). for example my home directory is /home/shane. I will do an example that works
shane@mainbox ~ $ pwd | sed "s/\/home\/shane/\/new\/directory/"
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...