andersonjb
Programmer
This JavaScript RegExp works on IE and Netscape on Windows, and on Netscape on the Mac, but not on IE on the Mac. It fails when trying to match the pattern.
function stripZeros(userId)
{
var pattern = new RegExp(/^([0\s]+)/);
if (userId.match(pattern) != null)
{
var stuffToStrip = userId.match(pattern);
userId = userId.substring(stuffToStrip[0].length, userId.length);
}
return userId;
}
function stripZeros(userId)
{
var pattern = new RegExp(/^([0\s]+)/);
if (userId.match(pattern) != null)
{
var stuffToStrip = userId.match(pattern);
userId = userId.substring(stuffToStrip[0].length, userId.length);
}
return userId;
}