remove bad words

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
God
Posts: 2
Joined: 03 Oct 2013, 10:03

remove bad words

Post by God » 11 Oct 2013, 09:07

i have 2 text files

"badwords.txt" (400+ words column) and "english-words.txt" (200k words column)

how do i remove the 400 words from the 200k list?

Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
Contact:

Re: remove bad words

Post by Coco » 11 Oct 2013, 10:39

I guess God doesn't like bad words

Code: Select all

badwords := "
(
badword_1
badword_2
badword_3
)"

file := "
(
the quick badword_3 fox
jumps over the badword_1
dog.
Hello badword_2
)"

Loop, Parse, badwords, `r`n
	if InStr(file, A_LoopField)
		StringReplace, file, file, % A_LoopField,, All

MsgBox, % file
return
Edit: There seems to be a bug with GeSHi

Guest10
Posts: 578
Joined: 01 Oct 2013, 02:50

Re: remove bad words

Post by Guest10 » 11 Oct 2013, 13:37

God, can you post the actual files?

Guest10
Posts: 578
Joined: 01 Oct 2013, 02:50

Re: remove bad words

Post by Guest10 » 12 Oct 2013, 09:06

can the above Coco's Code be modified to replace (not remove) bad words (as requested by God)?

Post Reply

Return to “Ask for Help (v1)”