marhk51
asked on
How do I do a NON case sensitve search in a string
Hi,
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,mas ter) to their username name string so I can display and error message.
This is what I've tried:
<CFIF IsDefined("Form.username") >
<CFIF FindNoCase("#notalloweduse rnames#"," #username# ") NEQ 0>
<CFSET usernameError = 1>
</CFIF>
</CFIF>
Thanks in advance.
Mark
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,mas
This is what I've tried:
<CFIF IsDefined("Form.username")
<CFIF FindNoCase("#notalloweduse
<CFSET usernameError = 1>
</CFIF>
</CFIF>
Thanks in advance.
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome!
ASKER