“MongoDB $ w Regex” Kod odpowiedzi

MongoDB $ w Regex

// Find user who has the first_name equal with "name" (case insensitive)
const users = await User.find({
	first_name: {
    	$in: [new RegExp(`^${name}$`, 'i'))]
    }
})
florinrelea

Regex MongoDB

{ <field>: { $regex: /pattern/, $options: '<options>' } }
{ <field>: { $regex: 'pattern', $options: '<options>' } }
{ <field>: { $regex: /pattern/<options> } }
Adorable Angelfish

Odpowiedzi podobne do “MongoDB $ w Regex”

Pytania podobne do “MongoDB $ w Regex”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu