php - Negate a $regex for mongodb in Yii2 -


i use $regex inside aggregation pipeline $match instruction in php. need find record "does not contain" string. i'v found out online $not operator used such cases, if try this:

$regex = "/.*".$sometext.".*";     $use['$not'] = $regex; 

also 1 not work:

new \mongoregex("/.*".$sometext.".*") $use['$not'] = $regex; 

in short need find text not contain string


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -