How to split domain-part from emailId in android? : I am making validation in email id in which I want to make condition for domain-part after "." not more than 255 character. for this I want to split domain-part after "." like "user@gmail.commmm" in this I want to split after ".".How can I do that

code:-

    /*validation for email*/
	private boolean isValidEmail(String email) {// validation for email Id
		boolean isValid = false;
		String expression = "^([_A-Za-z0-9-\\+])+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,255})$";

		Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);
		Matcher matcher = pattern.matcher(email);
		if (matcher.matches()) {
			isValid = true;

		}
		return isValid;
	}