Collections find

Hi,
I have problem with searching in collections.
I want to put variable in to whis:

SearchKey.findOne({keys: /.*variable.*/ })

I tried many ways but still dont know how to do this…
Please help

var value = "JLGJALFW";
SearchKey.findOne({'keys': value})

works just fine for me :wink:

but in your way it will find only JLGJALFW.
I want to something like this:
i have “abcd”, “abc”, “abcde”, "opl"
and when i type “ab” it will find all except “opl”.

I found how to do this: Collection.find({keys: {$regex: variable}})