<?php

$mode='/([\w\.\_]{2,10})@(\w{1,}).([a-z]{2,4})/';

$string='yc.com@mail.com';

echopreg_match($mode,$string);

?>