title: How to select multiple elements by position with XPath?
body: <p>I have the following XPath code that selects elements on the following website:</p>
  
  <p>XPath code:</p>
  
  <pre><code>//div[@title='buyer-info']
  </code></pre>
  
  <p>website: <a href="http://econpy.pythonanywhere.com/ex/001.html" rel="nofollow noreferrer">http://econpy.pythonanywhere.com/ex/001.html</a></p>
  
  <p>To select the first element of the returned elements, I would use:</p>
  
  <pre><code>(//div[@title='buyer-info'])[1]
  </code></pre>
  
  <p>I would like to select the 4th to the last elements. I imagine the XPath code would be something like:</p>
  
  <pre><code>(//div[@title='buyer-info'])[4:last()]
  </code></pre>
  
  <p>This is however not a valid XPath query.</p>