3
I have the following regular expression in a C++ format validation function using regex, but it is validating non-standard formats that I want.
b[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}b\\.[A-Z]{2,4}b
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid (não pode validar)
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid
Email: [email protected] Valid
the problem I want to emphasize is the regular expression would have to validate only formats like:
.com
.com.br
.net
.net.br
.org
.org.br
and formats such as:
@terra.com.br
@bol.com.br
@yahoo.com.br
@hotmail.com.br
@hotmail.com
ie the expression should not validate anything after . br
Worst that still not validating correctly look code I’m trying to make this regex work already some three days ago http://pastebin.com/evVcm7FE I also used this one as this on the site REGEX const Std::regex Pattern("[A-Z0-9._%-]+@[A-Z0-9-]+(\.[A-Z]{2,4}){1,2}"); e mesmo assim ainda nao valida
– dark777