summaryrefslogtreecommitdiff
path: root/jstests/regex5.js
blob: 7fe39d55f8fdeee0f8043a3f3c49aa51f4b8ef6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

t = db.regex5
t.drop()

t.save( { x : [ "abc" , "xyz" ] } )
t.save( { x : [ "ac" , "xyz" ] } )

a = /.*b.*c/
x = /.*y.*/

assert.eq( 1 , t.find( { x : a } ).count() , "A" )
assert.eq( 2 , t.find( { x : x } ).count() , "B" )
// assert.eq( 1 , t.find( { x : { $all : [ a , x ] } } ).count() , "C" ) // SERVER-505