diff --git a/source/reference/operator/regex.txt b/source/reference/operator/regex.txt index adff0693e0b..57820347dec 100644 --- a/source/reference/operator/regex.txt +++ b/source/reference/operator/regex.txt @@ -73,10 +73,11 @@ $regex ``collection`` that match the case insensitive regular expression ``acme.*corp`` that *don't* match ``acmeblahcorp``. - :operator:`$regex` uses :term:`indexes ` only when the - regular expression has an anchor for the beginning (i.e. ``^``) - of a string. Additionally, while ``/^a/``, ``/^a.*/``, and - ``/^a.*$/`` are equivalent, they have different performance - characteristics. All of these expressions use an index if an - appropriate index exists; however, ``/^a.*/``, and ``/^a.*$/`` - are slower. ``/^a/`` can stop scanning after matching the prefix. + :operator:`$regex` can only use an :term:`index ` efficiently + when the regular expression has an anchor for the beginning (i.e. ``^``) + of a string and is a case-sensitive match. Additionally, while + ``/^a/``, ``/^a.*/``, and ``/^a.*$/`` match equivalent strings, they + have different performance characteristics. All of these expressions + use an index if an appropriate index exists; however, ``/^a.*/``, + and ``/^a.*$/`` are slower. ``/^a/`` can stop scanning after matching + the prefix.