Good (insert timezone specific and culturally sensitive greeting)!
I am using the attached code that I think khkremer provided originally.
I use it specifically to remove dashes from social security numbers.
Well I found out today that once this script runs it drops leading zeroes.
So, if a social is 012-34-5678 this script will make it 12345678.
I think I have to turn it back into "not a string" cause I thought it had to be turned into a string for the regex to work properly..
If anyone can help, that would be greatly appreciated.
I am running this as a custom calculate script, if that is needed to be known.
Thanks again for your time and help.
var str = event.target.value + "";
str = str.replace(/[^0-9]+/g, "");
event.value = str;
this.getField("OSSN").value = event.value;