Skip to content

Commit f625c3b

Browse files
p-mongop
andauthored
MONGOID-4744 Audit tree for incorrect use of ^ and $ anchors, replace with \A \z as needed (#4768)
Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent ba63fc8 commit f625c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/tutorials/mongoid-queries.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ It is also possible to query using PCRE syntax by constructing
11921192

11931193
.. code-block:: ruby
11941194

1195-
Band.where(description: /^Project/).first
1195+
Band.where(description: /\AProject/).first
11961196
# => #<Band _id: 5dc9f7d5ce4ef34893354323, name: "Sun Project", description: "Sun\nProject">
11971197

11981198
Band.where(description: BSON::Regexp::Raw.new('^Project')).first

0 commit comments

Comments
 (0)