I am checking for a value, whether it is emailid or not using below code.

```
function getEmailId(inputTxt){
    var email = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
    return new RegExp(email).test(inputTxt);
}

var sTime = new Date();
var a = getEmailId("kuldeep.sharma@daffodilsw.com-daffodilsw");

console.log("value>>>>"+a+">>>time>>>>"+(new Date()-sTime));

```

It takes almost 55 sec. to give result for the input above, and if I change it to

```
var a = getEmailId("rajit.garg@daffodilsw.com-daffodilsw");

```

it takes almost 3.5 sec to give a result.

I am not able to understand this behavior.

Can anyone please help me to understands this behavior and is there any way possible to get the result instantly.