The while loop is useless if a regular expression is to be used. Here's the method I think of that will/must work.

Code:
alias -l match_text {
  Var %a = $replace($readini($keke,swear,words),$chr(44),$chr(124))
  If $regex($1-,/(\b( %a )\b)/xi) { Return $true } 
  Return $false
}


smile


tropnul