How to search for carriage return in eclipse

zfranciscus picture zfranciscus · Sep 8, 2009 · Viewed 24.4k times · Source

If I have the following text in my Eclipse editor:

Text Line 1
Text Line 2

I would like to concatenate the text into:

Text Line 1Text Line 2

My first idea was to search for carriage return character '\n' and replace it with '' to concatenate it.

I tried using the search function of Eclipse, but it does not recognize carriage return character.

Are there any other editor that can do this?

Answer

soru picture soru · Sep 8, 2009

Eclipse does this if you:

  • turn on regular expression mode in search/replace
  • enter \R for the newline