I need a regular expression that will match on all terms in a set of search terms. If the user types \"bat sun\" then I need to match any text entries that have words starting w
I think you can do something along the lines of:
.find( { Item: { $regex : /\b[Term1]/i, $regex : /\b[Term2]/i, $regex : /\b[TermN]/i } } );
See: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-RegularExpressions