title: Python re (regex) matching particular string containing letters, hyphen, numbers
body: <p>I am trying to match the following strings in python 2.7 using the python regular expression package re and am having trouble coming up with the regex code: </p>
  
  <pre><code>https://www.this.com/john-smith/e5609239
  https://www.this.com/jane-johnson/e426609216
  https://www.this.com/wendy-saad/e172645609215
  https://www.this.com/nick-madison/e7265609214
  https://www.this.com/tom-taylor/e17265709211
  https://www.this.com/james-bates/e9212
  </code></pre>
  
  <p>So the prefix is fixed "<a href="https://www.this.com/" rel="nofollow noreferrer">https://www.this.com/</a>" and then there are a variable number of lowercase letters, then "-", then "e", then a variable number of digits.</p>
  
  <p>Here is what I have tried to no avail:</p>
  
  <pre><code>href=re.compile("https://www.this.com/people-search/[a-z]+[\-](?P&lt;firstNumBlock&gt;\d+)/")
  
  href=re.compile("https://www.this.com/people-search/[a-z][\-][a-z]+/e[0-9]+")
  </code></pre>
  
  <p>Thanks for your help!</p>