From the documentation:
search_string = params['search']
# Constructor syntax coll.find({"name" => Regexp.new(search_string)})
# Literal syntax coll.find({"name" => /#{search_string}/})
Beware though... You can't use an index with this query since your regex isn't anchored to the front of the string.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…