H
Henri
Hello,
any idea why a regexp-based trim function would work fine in firefox but
not in ie?
code is
String.prototype.trim = function() {
re = /\s*$/g;
return this.replace(re, "");
}
it trims trailing spaces. I've tried various regular expressions. The
point is: this works in firefox (where supplied strings are trimed fine)
but ie (always ie -oh i wish ie didn't even exist!) the function returns
an unchanged string.
Thanks
any idea why a regexp-based trim function would work fine in firefox but
not in ie?
code is
String.prototype.trim = function() {
re = /\s*$/g;
return this.replace(re, "");
}
it trims trailing spaces. I've tried various regular expressions. The
point is: this works in firefox (where supplied strings are trimed fine)
but ie (always ie -oh i wish ie didn't even exist!) the function returns
an unchanged string.
Thanks