title: using regex to compare vehicle numbers in mongodb
body: <p>I have a scenario where i want to compare the vehicle number from the database.
  If the number enterd is <strong>KA03ME0101</strong> I will pick up only the number that is  3rd 4th and 7th till last elements from the string and compare it in database where I want to apply regex to do the same thing to number and compare it.
  Right now i am storing it as String. </p>
  
  <pre><code>   vehicle_number : {
     type : String
      },
  </code></pre>
  
  <p>And this query does it for me for now</p>
  
  <pre><code>    bookingSchema.statics.findBookingByVehicleNo = function(params, callback){
      return this.findOne({
          '$and' : [
              { 'booking_status' : { '$eq' : 'checked_in' }},
              { 'vehicle_number' : params.vehicle_number   }
          ]
      }).exec(callback);
  }
  </code></pre>
  
  <p>Suppose the vehicle no is <strong>`KA03ME0101</strong> , I want to write  a query, where I can compare only the numbers that is  excluding <strong>KA</strong> and <strong>ME</strong>  and picking up only the numbers that is <strong>030101</strong>.
  So the first two words are skipped and then pick up the 3rd and 4th number and then skip 5th and 6th and pick up the remaining number.
  From the user side I will pick up the number in the same way and then compare it.
  How can i apply regex to do this any lead would be helpful thankyou.</p>