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
Post a Comment