Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

rude word checker

Hi

I'm creating a website where the user can invent their own screen name. I want to make sure they don't come up with one containing swear words. can you advise how i would create a dictionary (or something) of rude words and name sure the screen name does not contain them.

In a screen name, what characters should i allow and disallow. I know underscores are useful but what about other characters, should i disallow them for simplicity?

thanks
andrea
SOLUTION
Avatar of ZeonFlash
ZeonFlash

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gangwisch
gangwisch

oh yeah another comment:
change
if instr(username,item)>0 then return true
to
if instr(username.tolower,item)>0 then return true

and change all your curse words in the arraylist to lowercase

sorry about that
You could just type all your swear words in to a text file and use instr() function to check if any word in the file matches the login
Avatar of andieje

ASKER

Thanks for your replies

Jeff, how would i do that option. Would i have one swear word per line? Could you give me some example code? I hanvet done much file manipulation.

thanks
andrea
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hope this enough to get you going before tomorrow

Jeff
Avatar of andieje

ASKER

THANKS a lot