Regular Expression To Match All Blank Lines In Document

Category: Strings

A regular expression that matches all blank lines in a document. This can be useful in deleting blank/empty lines generated in Sublime 2/3.

/^(\r|\n\r?)/

Matches:

  • All blank lines

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.