Hi David,
Can it be that your file has Unix line breaks and you are trying to match carriage returns?
There are 3 forms of line breaks:
• Unix (LF - linefeed) that can be matched with \n
• Legacy Mac (CR - carriage return) that can be matched with \r
• Windows (CRLF) that can be matched with \r\n
Furthermore PCRE regular expressions have the following generic character types:
• \s any white space character
• \h any horizontal white space character
• \v any vertical white space character
This regex should match any number of contiguous empty lines for the 3 types of line breaks:
^\s*\v
And those, single empty lines:
^\s*?\v (your initial intent)
or
^\h*\v
HTH
Jean Jourdain