Sublime Forum

How to delete line breaks in sublime?

#1

I have data like this

100,101,
102,103,
104,105,
106,107,

What do I run in sublime to make it in a single row so it becomes this

100,101,102,103,104,105,106,107

0 Likes

#2

You probably want to use the find and replace panel with regexp mode enabled to search for \n replacing it by empty string.

1 Like

#3

In addition, you can also select the content you want to join and use Edit > Line > Join Lines (see menu for the key binding for your platform), depending on how you want the result to look.

That is, the joined lines will have a space in the place where the newlines were, while the regex is a more faithful join.

0 Likes