title: Using xpath to match a string that contains any integer (between 0 and 9)
body: <p>I am new to XPath and need some help.</p>
  
  <p>The system auto generates the id which looks something like this:</p>
  
  <pre><code>&lt;input type="file" class="form-file" size="22" 
         name="files[entry-23245_field_entry_attachment_und_0]" 
         id="edit-entry-23245-field-entry-attachment-und-0-upload" 
         style="background-color: transparent;"&gt;
  </code></pre>
  
  <p>I am able to locate the id using xpath or css however the numbers within the id string changes as this is randomly generated so the next time my test runs, it fails because it cant locate the string. </p>
  
  <p>I would like to know if it is at all possible to write an xpath expression that will look for everything from the start of the string <code>edit-entry-</code> then some how look for any integer value between 0-9 within that string <code>-23245-</code>, then also match the end part <code>field-entry-attachment-und-0-upload</code>. this way when my test runs, it is able to locate the element all the time even if the numbers within the string change. iv tried adding <code>\d+</code> to my xpath but it doesn't seem to pick it up.</p>
  
  <p>This is the xpath: </p>
  
  <pre><code>//*[@id="edit-entry-23245-field-entry-attachment-und-0-upload"]
  </code></pre>