Sunday, 11 August 2013

I want to find for " @+ any character" javascript / jquery

I want to find for " @+ any character" javascript / jquery

How would I find " @"+any character with a regular expression maybe ?
I need to find in a textarea space plus @ plus any single character input
from the keyboard.
Have a strpos functions to find, just need the regular expression that
matches any character.
Thanks
This is my code:
var dauto=function(){
if(strpos($(this).val()," @"+reg_exhere)){
//perform autocomplete operation here with the cut after the @
}
}
$("._2yg").find("textarea").bind("keyup",dauto);
$("._2yg").find("textarea").bind("keydown",dauto);

No comments:

Post a Comment