expanding nonWordCharacterExceptions regular expression check