var str = 'stroka@gmail.com'; alert(/@(?=.+$)/.test(str) ); str = 'stroka@'; alert(/@(?=.+$)/.test(str) );