title: mongoose aggregate match not working with regex
body: <p>I need to find some records using regex. When the parameter value ends in 0 the result is empty, but when the last character is different from zero (1 - 9) the query works fine. </p>
  
  <pre><code>Invoice.aggregate([{
    '$lookup': {
      'from': 'clients',
      'localField': 'client',
      'foreignField': '_id',
      'as': 'client'
    }
  }, {
    '$unwind': '$client'
  }, {
    '$lookup': {
      'from': 'employees',
      'localField': 'sold_by',
      'foreignField': '_id',
      'as': 'sold_by'
    }
  }, {
    '$unwind': '$sold_by'
  }, {
    '$lookup': {
      'from': 'payment_types',
      'localField': 'payment_type',
      'foreignField': '_id',
      'as': 'payment_type'
    }
  }, {
    '$unwind': '$payment_type'
  }, {
    '$lookup': {
      'from': 'payments',
      'localField': 'payments.payment',
      'foreignField': '_id',
      'as': 'payment'
    }
  }, {
    '$unwind': '$payment'
  }, {
    $match: {
          'invoice': {
        $regex: /2490/i
      }
    }
  }])
  </code></pre>
  
  <p>When the query works the result exclude all the records that ends in 0.
  I try using the regex in this other way </p>
  
  <pre><code>"$match" : {
                  "invoice" : /^.*2490.*$/i
              }
  </code></pre>
  
  <p>and the result is the same.</p>
  
  <p>I use regex in other String fields and work fine only in this field doesn't work. the field store values like this</p>
  
  <pre><code>{
  '000-0000-2490',
  '000-0000-2491',
  '000-0000-2492'
  }
  </code></pre>