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
This might be the pattern that you're looking for:
'#(^|\s){1}('. $needle .')($|\s|,|\.){1}#i'
Some details depend on the restrictions that you want to apply.