s/(\w+)/$1 ne 'OR' && $1 ne 'AND' && $1 ne 'NOT' ? "fieldname = '$1'" : $1/eg;