Mongo find by regex: return only matching string
问题 My application has the following stack: Sinatra on Ruby -> MongoMapper -> MongoDB The application puts several entries in the database. In order to crosslink to other pages, I've added some sort of syntax. e.g.: Coffee is a black, caffeinated liquid made from beans. {Tea} is made from leaves. Both drinks are sometimes enjoyed with {milk} In this example {Tea} will link to another DB entry about tea. I'm trying to query my mongoDB about all 'linked terms'. Usually in ruby I would do something