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.
Asked
Active
Viewed 48 times
1 Answers
0
That's because the file is TAB
-separated, and \s
includes TAB
s. If you are interested in only spaces, please use +
or {2,}
instead.

Yutaka
- 1,761
- 2
- 5
- 9
-
Thanks, Yutaka. But this expression finds all the text, none of the white spaces. I still need to find 2 or more consecutive whitespaces to remove them with one. – Georg Kirchner Aug 25 '22 at 17:23
-
Sorry, I've updated my answer. – Yutaka Aug 25 '22 at 17:50
-
“ {2,}” works well. Thanks!! – Georg Kirchner Aug 25 '22 at 19:16