title: XPath testing that string ends with substring?
body: <p>Given that the HTML contains:  </p>
  
  <pre><code>  &lt;div tagname="779853cd-355b-4242-8399-dc15f95b3276_Destination" class="panel panel-default"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>How do we write the following expression in XPath:</p>
  
  <p><strong><em>Find a <code>&lt;div&gt;</code> element whose <code>tagname</code> attribute ends with the string 'Destination'</em></strong></p>
  
  <p>I've been searching for days and I can't come up with something that works. Among many, I tried for example:</p>
  
  <pre><code>div[contains(@tagname, 'Destination')]
  </code></pre>