title: Xpath Expression to match text correctly, but trim leading and trailing whitespace
body: <p>I need an xpath expression for my selenium tests to get this element:</p>
  
  <pre><code>&lt;td class="label"&gt;        Order Date      &lt;/td&gt;
  </code></pre>
  
  <p>but not this one:</p>
  
  <pre><code>&lt;td class="label"&gt;    Order Dates  &lt;/td&gt;
  </code></pre>
  
  <p>I tried these two: </p>
  
  <pre><code>"//*[text() = 'Order Date']"
  "//*[text()[contains(.,'Order Date')]]"
  </code></pre>
  
  <p>But the exact match expression doesn't take the whitespace into account, and the contains expression also targets the element with an <code>s</code>.  </p>