how to delete only the first lines within cell in libreoffice calc?

I have a huge no of cells in multiples columns. They have multiple lines in every cell. I want to remove every first line from each cell? any code/macro? or can i do it with regex?

Hello,

if, and only if, the lines have been created using CTRL+ENTER and hence contain a line feed character at the end of each line, you could use the following Find & Replace procedure:

Use the following procedure:

  • Select your column / affected cells
  • Menu Edit -> Find & Replace
    Find: ^.+\n(.+)
    Replace: $1
    Other Options 1: [x] Current selection only
    Other Options 2: [x] Regular expressions
  • Click Replace All

Recommendation: Test the procedure using a copy of the original file.
WARNING Don’t use this procedure, if the lines appear due to Wrap text automatically option of cell’s format

Hope that helps.

If the answer helped to solve your problem, please click the check mark (:heavy_check_mark:) next to the answer.