Regular expression escaping tab key
<p>Hi I want to allow alphanumeric + _ in a text box. but when I press tab it warns me about the special characters are not allowed. Here is the Javascript code. Is there a way to escape tab and carriage return using regular expressions ?</p>

<pre><code>function splChars(str)
{
if (str != "")
{
    if (/^[\w _\t\r]+$/.test(str))
        return true;
     else
        return false;
}
}
</code></pre>
