replace all occurrences of non-word characters