Check if the input value matches certain conditions in javascript

I have an email type input and I want to check if the inserted value matches the following pattern: [email protected] where word1 = minimum 1 character and maximum 5, word2= minimum 1 character, and word3 = precisely 2 characters. And I don’t want the form to be submitted unless this condition is met. I hope someone can help me