I have a delimited string containing tabs, and when I do Trim for the string it is not working. For normal space and double spaces Trim is working properly. Below is my code.
Dim arrStr
arrStr = Split("Customer|Customer Address |Account", "|")
If (Trim(arrStr(1)) = "First Lane") Then
WScript.Echo "Inside If"
End If
WScript.Echo "Outside If"
I tried with LTrim, RTrim and Trim, but nothing works. I also tried writing custom methods to trim tabs like below, but that also does not work. Any help here please?
Function customTrim(str)
Dim re
Set re = New RegExp
re.Pattern = "^\t*"
re.Multiline = False
customTrim = re.Replace(str, "")
End Function