L
Lord Merlin
Can someone please help me with a good swearword filter, or assist me with
my current one?
This is the code I have currently, but it doesn't always work. I can do the
same test, with the same word 4/5/6/7 times in a row, and sometimes it
works, sometimes not.
============================================================
arrcheck(0) = "god"
arrcheck(1) = "jesus"
arrcheck(2) = "fart"
..................
...................
arrcheck(72) = "arse"
arrcheck(73) = "crap"
strsubject = " " & GetFormData("strsubject") & " "
incident = " " & GetFormData("incident") & " "
solution = " " & GetFormData("solution") & " "
'--------SWEAR FILTER-----------------
For Each tWord in arrCheck
tWord=UCASE(tWord)
strsubject = Replace(strsubject," " & tWord & " "," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "."," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "!"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "?"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "-"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & ","," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "_"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "/"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "&"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "@"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "@"," *** ",1,-1,1)
Next
For Each tWord in arrCheck
tWord=UCASE(tWord)
incident = Replace(incident," " & tWord & " "," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "."," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "!"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "?"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "-"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & ","," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "_"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "/"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "&"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "@"," *** ",1,-1,1)
Next
For Each tWord in arrCheck
tWord=UCASE(tWord)
solution = Replace(solution," " & tWord & " "," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "."," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "!"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "?"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "-"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & ","," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "_"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "/"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "&"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "@"," *** ",1,-1,1)
Next
'/--------SWEAR FILTER-----------------
strsubject = Trim(strsubject )
incident = Trim(incident )
solution = Trim(solution )
============================================================
your help in this matter will be greatly appreciated
--
Kind Regards
Rudi Ahlers
+27 (82) 926 1689
Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
my current one?
This is the code I have currently, but it doesn't always work. I can do the
same test, with the same word 4/5/6/7 times in a row, and sometimes it
works, sometimes not.
============================================================
arrcheck(0) = "god"
arrcheck(1) = "jesus"
arrcheck(2) = "fart"
..................
...................
arrcheck(72) = "arse"
arrcheck(73) = "crap"
strsubject = " " & GetFormData("strsubject") & " "
incident = " " & GetFormData("incident") & " "
solution = " " & GetFormData("solution") & " "
'--------SWEAR FILTER-----------------
For Each tWord in arrCheck
tWord=UCASE(tWord)
strsubject = Replace(strsubject," " & tWord & " "," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "."," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "!"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "?"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "-"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & ","," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "_"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "/"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "&"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "@"," *** ",1,-1,1)
strsubject = Replace(strsubject," " & tWord & "@"," *** ",1,-1,1)
Next
For Each tWord in arrCheck
tWord=UCASE(tWord)
incident = Replace(incident," " & tWord & " "," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "."," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "!"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "?"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "-"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & ","," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "_"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "/"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "&"," *** ",1,-1,1)
incident = Replace(incident," " & tWord & "@"," *** ",1,-1,1)
Next
For Each tWord in arrCheck
tWord=UCASE(tWord)
solution = Replace(solution," " & tWord & " "," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "."," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "!"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "?"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "-"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & ","," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "_"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "/"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "&"," *** ",1,-1,1)
solution = Replace(solution," " & tWord & "@"," *** ",1,-1,1)
Next
'/--------SWEAR FILTER-----------------
strsubject = Trim(strsubject )
incident = Trim(incident )
solution = Trim(solution )
============================================================
your help in this matter will be greatly appreciated
--
Kind Regards
Rudi Ahlers
+27 (82) 926 1689
Greater love has no one than this, that he lay down his life for his friends
(John 15:13).