As per the title, how would one match on a regular expression with the Doctrine 2 query builder? Basically I\'m trying to generate unique slugs.
Here is my current
Not tested (for MySQL):
$qb->where(new Doctrine\ORM\Query\Expr\Comparison( 'o.slug', 'REGEXP', ':slug') ); $qb->setParameter('slug', '^'.$slug->__toString().'-[[:digit:]]+$');