How do I do a NON case sensitve search in a string
Posted on 2003-03-14
Please can somebody tell me how I can do a NON case sensitve search within a string ??
For example, a user enters their username as 55ADMIN66 or iamADMIN through a form, but they entered a word **within** their username which is not allowed i.e admin,swear words etc.
How do I compare a list of words i.e (NotAllowedUsernames = "admin,owner,moderator,master) to their username name string so I can display and error message.
This is what I've tried:
<CFIF FindNoCase("#notallowedusernames#","#username#") NEQ 0>
<CFSET usernameError = 1>
Thanks in advance.