Comumente usado Android reg exp

Patterns.PHONE.matcher(“+1-111-111-111”).matches(); // truePatterns.PHONE.matcher(“+1_111_111_111”).matches(); // falsePatterns.EMAIL_ADDRESS.matcher(“example@gmail.com”).matches(); // truePatterns.EMAIL_ADDRESS.matcher(“example@gmail_com”).matches(); // falsePatterns.WEB_URL.matcher(“www.google.com”).matches(); // truePatterns.WEB_URL.matcher(“www.goo_gle.com”).matches(); // false

Continuar lendo