text.replace(/[\u00AD\w\uac00-\ud7af]+$/, ''); // remove fragment of the last word together with possible soft-hyphen options.onlyFullWords) { // remove fragment of the last or first word together with possible soft-hyphen