Reputation: 33644
I am trying to remove whitespaces but not new lines in my text file in sublime text
I tried doing a find and replace of \s
with nothing
, but it also removes new lines, how can I remove whitespaces excluding new lines?
Upvotes: 0
Views: 44
Reputation: 1801
Replace \n
by some unique string like 1@3@#
(which would not be present in your document) and then replace \s
by nothing
and then finally replace 1@3@#
by \n
Upvotes: 0