I want to find out if user has used the words admin or username anywhere in their possible username string.
admin
username
So if user wants to use admin
Just look for words using word boundaries:
/\b(?:admin|username)\b/i
and if there is a match return error e.g.
if (preg_match('/\b(?:admin|username)\b/i', $input)) { die("Invalid Input"); }