Validate new user email name matching a pattern on registration
Try something like this, add a validate to user_registration_form and then in validate check email with your pattern and if not match use form_set_error. something like below

function registration_check_form_user_register_alter(&amp;$form, &amp;$form_state)
{
    $form['#validate'][] = 'registration_check_user_register_validate';
}
function registration_check_user_register_validate($form, &amp;$form_state)
{
        $email=$form_state['values']['email']['und'][0];
        if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)\.edu/i",$email))
                {
                form_set_error('mail', t('Email NOT VALID,TRY EMAIL WITH .EDU'));
            }   
}