You can use the chr 161 for a addtok and then if ($regex($1-,$+(\b(,%swearlist,)\b))) { do w/e you want do it }