make empty string pattern matching more compatible with alternate implementations like Nokogiri