Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Profanity filter?

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
I have a text field that I want to filter out certain words from. Does anyone know of a component or exisiting code snippet to do this? Miles
busymiles@lan-house.net
 
Here, I'll show you how to filter out 'tek' and 'tips' from a field.

dim theText, filterWords(2),i
theText = request.form("theText")

filterWords(0) = 'tek'
filterWords(1) = 'tips'

for i = 0 to ubound(filterWords)-1
theText = replace(theText,filterWords(i),"@*")
next

where any mention of the words, 'tek' or 'tips' would be replaced with '@*'.

Modify as needed. ;-)

paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top