Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8051

Regex don't work with number

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • None
    • None
    • None
    • Linux

    Description

      The following command doesn't find anything if the type of numero_pedido it's a number, but if the type is a string the commando works normally.

      db.pedidos.find( {"numero_pedido":{"$regex":/135/}}, [] ).sort( [] ).limit( 20 ).skip( 0 )

      Attachments

        Activity

          People

            Unassigned Unassigned
            tiago.temporin Tiago Temporin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: