$ means “Match the end of the string ” (the position after the last character in the string). Both are called anchors and ensure that the entire string is matched instead of just a substring.
Read moreWhat is regex used for?
A regular expression (shortened as regex or regexp; also referred to as rational expression) is a sequence of characters that specifies a search pattern in text . Usually such patterns are used by string-searching algorithms for “find” or “find and replace” operations on strings, or for input validation.
Read moreAre MongoDB field names case sensitive?
A database with “” empty string is not a valid database name. Database name cannot be more than 64 bytes. Database name are case-sensitive , even on non-case-sensitive file systems. Thus it is good to keep name in lower case.
Read moreIs MongoDB search case insensitive?
Mongo (current version 2.0. 0) doesn’t allow case-insensitive searches against indexed fields – see their documentation. For non-indexed fields, the regexes listed in the other answers should be fine.7 Kas 2011
Read moreIs Preg_match case insensitive?
preg_match is case sensitive .
Read moreHow do you ignore case sensitive in regex?
If you want only part of the regex to be case insensitive (as my original answer presumed), then you have two options:
Read more