I have the following code but it always returns false with usernames that should be ok, like 'tttt'.
function isUsername(username)
{
var usernamePattern = new RegExp("/^[a-zA-Z0-9_]{3, 25}$/");
if (!usernamePattern.test(username))
{
alert ('pattern:' + username);
return false;
}
return true;
}
What am I doing wrong?