I am extracting some data from a html page and I have a char that I know is non-ascii. I have been able to remove that character with a regex. When I display the cleaned string using a response.write, it visually looks right - contains 3 items , each separated by one space. But when I view the underlaying html source from my response.write - its whacky.
And when I try to split it on the spaces, it only creates two data items instead of three. It groups the first two items together separated by a space, and then the last item.
I checked the length . it will not split correctly, I need to split it on spaces, breaking the string into 3 parts.
How can I fix this?
I have inserted my coding and attached images of it.
Any help appreciated. Thank you!
Set regEx = New RegExp
regEx.Global = true
regEx.IgnoreCase = True
regEx.Pattern = "[^\w\.\$\s]"
tempTxt = regEx.Replace(wrkstring, "")
StripNonChars = tempTxt
Visual image when I display my extracted string with response.write
This is what the underlying html source code looks like