title: How to use regex in django query
body: <p>In the database image names are saved in the below format.</p>
  
  <pre><code>+------------+------------+------------+-----------+
  | adv_images | start_date | end_date   |        id |
  +------------+------------+------------+-----------+
  | 1.jpg      | 2013-05-22 | 2013-05-28 |        64 |
  | 1a.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 1b.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 1c.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 2.jpg      | 2013-05-22 | 2013-05-28 |        64 |
  | 2a.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 2b.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 2c.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 3.jpg      | 2013-05-22 | 2013-05-28 |        64 |
  | 3a.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  | 3b.jpg     | 2013-05-22 | 2013-05-28 |        64 |
  +------------+------------+------------+-----------+
  </code></pre>
  
  <p>I want to pull the data from db group by 'adv_images', for ex- here its showing 11 records in the db, but i want to pull only 3 i.e(1.jpg, 2.jpg and 3.jpg). Basically 1, 2, 3 are the main images of an album and 1a, 1b, 2a, 2b etc are the sub images. I am trying to use regular expression in django query , but no success. I also want to pull the count for the number of images per album. like for album 1 nd 2 the count will be 4 and for album 3 the count will be 3.</p>
  
  <p>N:B: The image names are always starts with a digit.</p>