Java tutorial
//package com.java2s; public class Main { public static boolean isValidEmail(String paramString) { String regex = "[a-zA-Z0-9_\\.]{1,}@(([a-zA-z0-9]-*){1,}\\.){1,3}[a-zA-z\\-]{1,}"; if (paramString.matches(regex)) { return true; } else { return false; } } }