0
I'm trying to remove all lines starting with whitespace characters from a big text file using Atom. The regular expression I use is ^[\s]+.*$
. The problem is, it selects not only lines starting with whitespace, but also one line after them. The file is in UTF-8 and most characters are Cyrillic. What am I doing wrong?
This matches only non-empty lines. However, empty lines can later be removed with
^(?:[\t ]*(?:\r?\n|\r))+
. The problem is solved. – John Ashpool – 2015-10-03T13:08:01.517Ok, this should do it all:
^\n|(^[ \t]+.*\n*)
– user193661 – 2015-10-03T18:27:15.950