Delete blank lines

Asked

Viewed 3,392 times

1

I have a text that has a structure like this:

AJUSTE_ESTOQUE

AJUSTE_PRODUCAO

AJUSTE_QUALIDADE

AMOSTRA

I made a regex (^\s*$) to locate these blank lines, how can I remove them so that each word is underneath the other ? I am using the sublime for this job.

1 answer

3


Press the shortcut CTRL+H or get into Find/Replace. Look for ^\s* in the field Find What and replace with nothing (leave the field Replace With blank).

Make sure to enable regular expression search through the button E.

inserir a descrição da imagem aqui

Press the button Replace All and its result will be:

AJUSTE_ESTOQUE
AJUSTE_PRODUCAO
AJUSTE_QUALIDADE
AMOSTRA

Some terms may vary depending on the language used in the editor.

  • Thank you :), show.

  • 1

    ^\s* will replace all spaces at the beginning of each line, not just blank lines.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.