summaryrefslogtreecommitdiff
path: root/jstests/core/regex_options.js
blob: 3febe2575ab1f469576432cd4fab2f90daa23117 (plain)
1
2
3
4
5
6
7
t = db.jstests_regex_options;

t.drop();
t.save( { a: "foo" } );
assert.eq( 1, t.count( { a: { "$regex": /O/i } } ) );
assert.eq( 1, t.count( { a: /O/i } ) );
assert.eq( 1, t.count( { a: { "$regex": "O", "$options": "i" } } ) );