Java tutorial
//package com.java2s; import java.util.regex.Pattern; public class Main { public static boolean checkingEmail(String email) { if (!Pattern.compile( "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$") .matcher(email).find()) { return false; } return true; } }