#4723

CaptainFlint
Participant

JavaScript has its own Escape-character ” and uses it for its own purposes. So, when you write ‘s’ JavaScript converts it into single ‘s’, when you write ‘1’ it is converted into character with octal code 001, etc. The correct expression hence would be:
document.selection.Replace(‘(s){2,}’, ‘1’, eeFindReplaceRegExp | eeReplaceAll);