title: Scrapy - select xpath with a regular expression
body: <p>Part of the html that I am scraping looks like this:</p>
  
  <pre><code>&lt;h2&gt; &lt;span class="headline" id="Profile"&gt;Profile&lt;/span&gt;&lt;/h2&gt;
  &lt;ul&gt;&lt;li&gt; &lt;b&gt;Name&lt;/b&gt; Albert Einstein
  &lt;/li&gt;&lt;li&gt; &lt;b&gt;Birth Name:&lt;/b&gt; Alberto Ein
  &lt;/li&gt;&lt;li&gt; &lt;b&gt;Birthdate:&lt;/b&gt; December 24, 1986
  &lt;/li&gt;&lt;li&gt; &lt;b&gt;Birthplace:&lt;/b&gt; &lt;a href="/Ulm" title="Dest"&gt;Ulm&lt;/a&gt;, Germany
  &lt;/li&gt;&lt;li&gt; &lt;b&gt;Height:&lt;/b&gt; 178cm
  &lt;/li&gt;&lt;li&gt; &lt;b&gt;Blood Type:&lt;/b&gt; A
  &lt;/li&gt;&lt;/ul&gt;
  </code></pre>
  
  <p>I want to extract each component - so name, birth name, birthday, etc.</p>
  
  <p>To extract the name I do:</p>
  
  <pre><code>a_name = response.xpath('//ul/li/b[contains(text(),"Name")]/../descendant::text()').extract()
  </code></pre>
  
  <p>then I check that a_name is not an empty list and I call:</p>
  
  <pre><code>"".join(a_name[2:]).strip()
  </code></pre>
  
  <p>I do this for consistency since in Birthplace, I just want to extract the text, excluding all the html attributes. So I would get Ulm, Germany.</p>
  
  <p>The problem is that when I use contains(text(), "Name"), the entry for Birth Name also matches. How can I avoid this when building my selector?</p>
  
  <p>With a regular expression I could specify something like text() matches ^Name.* since the text Name may or may not be followed by a colon and or space.</p>
  
  <p>Is there a way to use regular expressions to solve this problem?</p>