You could use some other character to indicate a blank line, such as - or . or * and then match that character.

Or, you may be able to match the length of the selected text. Assuming that none of the other lines can have only 1 character, use if($len([text]) == 1) {

-genius_at_work