title: Nokogiri get element if type is in brackets
body: <p>I have a content like this:</p>
  
  <pre><code>[caption id=\"attachment_3182\" align=\"aligncenter\" width=\"800\" caption=\"blah blah\"]&lt;img class=\"size-full wp-image-3182\" title=\"blah\" src=\"http://www.test.com/blah.jpg\" alt=\"\" width=\"800\" height=\"533\" /&gt;[/caption]
  &lt;div&gt;other code here&lt;/div&gt;
  </code></pre>
  
  <p>I want to get all <code>caption</code> elements from it, so I'm trying to do something like this:</p>
  
  <p><code>doc.css("[caption]")</code> and <code>doc.xpath('.//[caption]')</code></p>
  
  <p>but have had no success.</p>