File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
source/reference/operator Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,11 @@ $regex
73
73
``collection`` that match the case insensitive regular expression
74
74
``acme.*corp`` that *don't* match ``acmeblahcorp``.
75
75
76
- :operator:`$regex` uses :term:`indexes <index>` only when the
77
- regular expression has an anchor for the beginning (i.e. ``^``)
78
- of a string. Additionally, while ``/^a/``, ``/^a.*/``, and
79
- ``/^a.*$/`` are equivalent, they have different performance
80
- characteristics. All of these expressions use an index if an
81
- appropriate index exists; however, ``/^a.*/``, and ``/^a.*$/``
82
- are slower. ``/^a/`` can stop scanning after matching the prefix.
76
+ :operator:`$regex` can only use an :term:`index <index>` efficiently
77
+ when the regular expression has an anchor for the beginning (i.e. ``^``)
78
+ of a string and is a case-sensitive match. Additionally, while
79
+ ``/^a/``, ``/^a.*/``, and ``/^a.*$/`` match equivalent strings, they
80
+ have different performance characteristics. All of these expressions
81
+ use an index if an appropriate index exists; however, ``/^a.*/``,
82
+ and ``/^a.*$/`` are slower. ``/^a/`` can stop scanning after matching
83
+ the prefix.
You can’t perform that action at this time.
0 commit comments