Regex don't work with number

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 )

            Assignee:
            Unassigned
            Reporter:
            Tiago Temporin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: