title: Break attribute using jQuery
body: <p>I'm using PHP to generate some <code>&lt;input type="text" class="date" name="date'.$i.'"&gt;</code> fields where $i increments through the <code>foreach</code> function I'm using. 
  So I will have something like this:</p>
  
  <pre><code>&lt;input type="text" class="date" name="date1"&gt;
  &lt;input type="text" class="date" name="date2"&gt;
  &lt;input type="text" class="date" name="date3"&gt;
  </code></pre>
  
  <p>I'm using jQuery <code>.last()</code> function to select the last element with class <code>date</code>, but I need to find a way to get that number from the <code>name</code> attribute after <code>date</code>. I know I need to use <code>.attr()</code> to get the name, but I don't know how to split it and get the number.</p>