Legally detection of Email format. Main support:
1. Only one @
2. No continuous ..
3. Support alphanumeric and _
4. End of "."
5. Can't follow it in @ _
The code is as follows: (if you add other rules, you can continue on this basis)
Public static boolean isvalidmain (string email) {string pattern3 = "// w * @ {1} [// w // .]*// w"; string pattern4 = ". * //.//..* "; return pattern.matches (pattern3, content) &&! Pattern.matches;}