Nokogiri: Searching for <div> using XPath
问题 I use Nokogiri (Rubygem) css search to look for certain <div> inside my html. It looks like Nokogiri's css search doesn't like regex. I would like to switch to Nokogiri's xpath search as this seems to support regex in search strings. How do I implement the (pseudo) css search mentioned below in an xpath search? require 'rubygems' require 'nokogiri' value = Nokogiri::HTML.parse(<<-HTML_END) "<html> <body> <p id='para-1'>A</p> <p id='para-22'>B</p> <h1>Bla</h1> <p id='para-3'>C</p> <p id='para