Hello, I am new to this group. I am utterly frustrated with this issue. Here is the issue:
The entire variable is replaced when attempting to replace only periods - it replaces the whole word instead of just the period(s).
This is the code that is giving me the problem.
myString = new String(rs('OVR_Insured'))
rExp = /./gi;
newString = new String ("?")
OVR_Insured = myString.replace(rExp, newString)
There are no syntax errors or anything and, the same code, but with a dash or a comma (instead of a period) between the slashes, works perfectly. Ex.
myString = new String(rs('OVR_Insured'))
rExp = /-/gi;
newString = new String ("?")
OVR_Insured = myString.replace(rExp, newString)
The above works perfectly in terms of replacing all instances of "-" with "?"
I think a period somehow represents the whole variable instead of the server taking it literally and a "period represents a period".
All I am trying to do is remove all periods from a variable. If someone can show me a working example of this being accomplished in Jscript, I would be forever greatful and probably avoid getting fired. :)
Thank You,
Scott