javascript - Combining RegEx's -


i have 2 regex's trying combine. 1 email specific , other checks special characters. have arrived @ solution following toying:

"^([-0-9a-za-z.+_]+@[-0-9a-za-z.+_]+\.[a-za-z]{2,4}|[\\w\\-ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸçÇŒœßØøÅ寿ÞþÐð _]){0,80}$" 

it seem check need to, instance following still returned valid: abc@foo not force full email address.

am using correct approach or there simpler way structure regex? i'm on learning curve regex advice appreciated.

move multiplier {0,80} inside parenthesis:

"^([-0-9a-za-z.+_]+@[-0-9a-za-z.+_]+\.[a-za-z]{2,4}|[\\w\\-ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸçÇŒœßØøÅ寿ÞþÐð _]{0,80})$" //                                                                                                                      here __^^^^^^^ 

also [a-za-z]{2,4} poor validate tlds, have @ iana.

and me@localhost valid email address.


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -