{"action":"opened","issue":{"url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/81","labels_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/81/comments","events_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/81/events","html_url":"https://github.com/mizzao/meteor-autocomplete/issues/81","id":65108410,"number":81,"title":"Issue with selector with regex in return","user":{"login":"shrop","id":14832,"avatar_url":"https://avatars.githubusercontent.com/u/14832?v=3","gravatar_id":"","url":"https://api.github.com/users/shrop","html_url":"https://github.com/shrop","followers_url":"https://api.github.com/users/shrop/followers","following_url":"https://api.github.com/users/shrop/following{/other_user}","gists_url":"https://api.github.com/users/shrop/gists{/gist_id}","starred_url":"https://api.github.com/users/shrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrop/subscriptions","organizations_url":"https://api.github.com/users/shrop/orgs","repos_url":"https://api.github.com/users/shrop/repos","events_url":"https://api.github.com/users/shrop/events{/privacy}","received_events_url":"https://api.github.com/users/shrop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-29T23:48:49Z","updated_at":"2015-03-29T23:48:49Z","closed_at":null,"body":"I have seen a few examples like below:\r\n\r\n```\r\nselector: function(match) {\r\n  regex = new RegExp(match, 'i')\r\n  return {'profile.firstName': regex}\r\n}\r\n```\r\n\r\nI am actually trying the code above. If I put a string in place of `regex`, it is passed and works correctly, but when I use the `regex` variable, the output sent to query looks like this `'profile.firstName': {} } { limit: 10, sort: { _id: 1 } }`. Notice the `regex` portion is missing.\r\n\r\nAnyway, I am not sure why this doesn't work yet. Any thoughts?"}}