emeditor

In EmEditor, how to normalize multiple consecutive whitespaces to 1 in multi-column file


When I search for \s\s+ to replace with “ “, lines in column 1 and 2 get concatenated, unless text line in column 1 ends in punctuation mark. Please provide expression to normalize whitespaces w/o losing multi-column data structure.

enter image description here


Solution

  • That's because the file is TAB-separated, and \s includes TABs. If you are interested in only spaces, please use + or {2,} instead.