When i add `+@[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$/;` this code to this `/^[\ba-zA-Z\s-\.\_]` in email field in form not accepting any key.

```
function mailonly(e){

var code;
if (!e) var e = window.event;
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
var character = String.fromCharCode(code);
    var AllowRegex  =/^[\ba-zA-Z\s-\.\_]

+@[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$/;

    if (AllowRegex.test(character)) return true;
    return false;
}

```