G
Guest
Okay I am ready to pull what little hair I have left out.
I pass the function below my String to search, my find string (a regular
expression) and my replace string (another regular expression). Why does this
function replace the found reg ex. with the actual string "\t" and not a tab?
(in the example below out of frustration I actually hardcoded the "\t")
Private Shared Function replaceAll(ByVal strIn As String, ByVal strFind As
String, ByVal strReplace As String)
Return Regex.Replace(strIn, strFind, "\t")
End Function
I re-wrote it in C# and it works fine
private static string replaceAll(string strIn, string strFind, string
strReplace)
{
return Regex.Replace(strIn, strFind, "\t");
}
(I do not want to re-write the whoel app in C# so don't suggest that to me!!)
Please tell me I am an idiot and I am missing something huge.
I pass the function below my String to search, my find string (a regular
expression) and my replace string (another regular expression). Why does this
function replace the found reg ex. with the actual string "\t" and not a tab?
(in the example below out of frustration I actually hardcoded the "\t")
Private Shared Function replaceAll(ByVal strIn As String, ByVal strFind As
String, ByVal strReplace As String)
Return Regex.Replace(strIn, strFind, "\t")
End Function
I re-wrote it in C# and it works fine
private static string replaceAll(string strIn, string strFind, string
strReplace)
{
return Regex.Replace(strIn, strFind, "\t");
}
(I do not want to re-write the whoel app in C# so don't suggest that to me!!)
Please tell me I am an idiot and I am missing something huge.