i’m working with mongodb and doctrine/mongodb-odm-bundle i’m trying to build a query like this
$matches = array("/^abc/", "/^dbc/);
$this->createQueryBuilder()
->field('field_name')->in($matches)
->getQuery();
is use $all and $in conditional operators with regular expressions. it’s posible?
You can, but while I’m no PHP expert, it looks like
$matchesis an array of strings, not regular expressions. You’d need to do something like this instead:In the shell you’d do: