I'm trying to convert this query in java:
db.beni.find({ $where: function() {
return /.*11/.test(this.foglio) || /.*99/.test(this.comune) } })
Where this.foglio is a numeric field and this.comune is a string fields.
Thanks
来源:https://stackoverflow.com/questions/9824339/mongodb-java-driver-query-with-regexp-number-fields