Executing the following queries I was expecting the same result but apparently they are dealt differently:
has the same result has using $regex operator
- not matching query
But using $regex operator fails
Is this the expected behaviour ? and if so why ?
Looking deeper in the code I can also see the following comment:
and looking int the jstests it makes even less sense: