Hi, Please tell me the pattern to validate a twitter handler using preg_match
Thanks
Hi, Please tell me the pattern to validate a twitter handler using preg_match
Thanks
Twitter allows you to use letters, numbers, and '_', so
preg_match("/[a-z0-9_]+/i", username)
for a case-insensitive search with at least one character.
I think greg forgot the "@" that indicates the beginning of a twitter handler:
preg_match("/\@[a-z0-9_]+/i", $username);