Regular Expressions Help

Regular Expressions Help

Regex such as "^[A-Za-z]$" doesn't seem to work. I also tried an email regex like "^[A-Za-z0-9]+@[A-Za-z0-9]+\\.[A-Za-z]{2,}$" it doesn't work. My code below.

emailRegEx = "^[A-Za-z0-9]+@[A-Za-z0-9]+\\.[A-Za-z]{2,}$";
e = input.Email_Address;
e = e.trim();

if(e.matches( emailRegEx ) == false)
{
    errors.add("Email not in correct format");
}


I am using regex for validation instead of validation that comes with zoho because I am implementing a conditional validation. Some form fields are required depending on their visibility. Btw I'm using a stateless form for a reason.

What is the correct way to implement this?