I think what I want to do is rather simple, but not sure. I'd like to do this in the easiest way as I have multiple different variables I want to apply this to. I want to search if a variable contains a certain word or words and then if it does set a new variable. For example if someone signs up for email and they have Gmail, I want to set a new variable for use later. I'm self taught and obviously new to java and would appreciate any feedback. Thanks.
if (email == "*@gmail.com")
{
var mailtype = "gmail"
};
Another example would be to verify email address format:
if (email == "*@*.*")
{
var mailformat = "okay"
};