but this is an all-in-one script ... it looks for
codes/caps/badwords and repeats.
i want to set the badwords as a list, and match them againist text.
i also will be using 2 different lists.
set badwords {
"test"
"t e s t"
"*more*"
}
PROBLEM:
If i use:
Code: Select all
foreach w $badwords {
if {[string match -nocase "$w" "$strip"]} {
string does not match the pattern
the entire string had to match the entire pattern, character for character.
If i use:
Code: Select all
foreach w $badwords {
if {[string match -nocase "*$w*" "$strip"]} {
If i use:
Code: Select all
foreach w $badwords {
if {[string match -nocase "* $w *" "$strip"]} {
if i split the string to a list and list search,
entrys like "t e s t" can not be matched.
i have tried some regexp, but it will kick on "testing" ... i only want it to kick on "test"
thanks for any help given