title: How to use XPath contains() for specific text?
body: <p>Say we have an HTML table which basically looks like this:</p>
  
  <pre><code>2|1|28|9|
  3|8|5|10|
  18|9|8|0|
  </code></pre>
  
  <p>I want to select the cells which contain only 8 and nothing else, that is, only 2nd cell of row2 and 3rd cell of row3.</p>
  
  <p>This is what I tried: <code>//table//td[contains(.,'8')]</code>. It gives me all cells which contain 8. So, I get unwanted values 28 and 18 as well.</p>
  
  <p>How do I fix this?</p>
  
  <p><strong>EDIT:</strong> Here is a sample table if you want to try your xpath. Use the calendar on the left side-<a href="https://sfbay.craigslist.org/sfc/" rel="noreferrer">https://sfbay.craigslist.org/sfc/</a></p>