Matching blank lines - TechRepublic
General discussion
April 7, 2000 at 12:39 AM
jdogg

Matching blank lines

by jdogg . Updated 25 years, 9 months ago

I am trying to match all blank (including null) lines in a text file. Using sed the regular expression is:

/^[]*$/

which should match 0 or more occurrences of a space or tab followed by the end of line. I have even seen this expression quoted – a colleague has used the same expression in an ex command in vi and both of us cannot get it to work.

Any ideas?

This discussion is locked

All Comments