Skip to content
Advertisement

facebook username validation regex pattern

i need a regex pattern to validate if a string is a valid facebook username?

Advertisement

Answer

According to this site

preg_match('/^[a-zd.]{5,}$/i', $username);
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement