[HTML] import Java. util. regEx. matcher; import Java. util. regEx. pattern; public class checkmobileandemail {/*** verify that the email address is correct * @ Param email * @ return */public static Boolean checkemail (string email) {Boolean flag = false; try {string check = "^ ([a-z0-9A-Z] + [-| \.]?) + [A-z0-9A-Z] @ ([a-z0-9A-Z] + (-[a-z0-9A-Z] + )? \\.) + [A-Za-Z] {2,} $ "; pattern RegEx = pattern. compile (check); matcher = RegEx. matcher (email); flag = matcher. matches ();} catch (exception e) {flag = false;} return flag ;} /*** verify the mobile phone number ** @ Param mobiles * @ return [0-9] {5, 9} */public static Boolean ismobileno (string mobiles) {Boolean flag = false; try {pattern P = pattern. compile ("^ (13 [0-9]) | (15 [^ 4, \ D]) | (18 [-9]) \ D {8} $ "); matcher M = P. matcher (mobiles); flag = m. matches () ;}catch (exception e) {flag = false;} return flag;} // verify whether the number is public static Boolean isnum (string number) {Boolean flag = false; try {pattern P = pattern. compile ("^ [0-9] {5} $"); matcher M = P. matcher (number); flag = m. matches () ;}catch (exception e) {flag = false ;}return flag ;}}