Nokogiri May 9th, 2019 1:15 pm install apt-get install libxslt-dev libxml2-dev s 1 2 3 4 5 # split br a.search('br').each do |n| n.replace("\n") end a.text.split("\n") 1 2 3 4 #   remove #gsub("\u00A0", "") doc.xpath(".//p/text()").map(&:content).select{|i|not i == "\u00A0"}