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

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -