MongoDB reverse regex

You can use the $where operator in the following fashion:

db.col.find({$where: "\"my regex\".match(this.regex)"})

Leave a Comment