Регистрация Войти
Войти через VK Войти через FB Войти через Google Войти через Яндекс
Войти через VK Войти через FB Войти через Google Войти через Яндекс
Поиск по сайту
MongoRegex::__construct
(PECL mongo >= 0.8.1)
MongoRegex::__construct — Creates a new regular expression
Описание
MongoRegex::__construct ( string $regex )Creates a new regular expression.
Список параметров
regex -
Regular expression string of the form /expr/flags.
Возвращаемые значения
Returns a new regular expression.
Примеры
Пример #1 MongoRegex::__construct() example
This example uses a regular expression to query for all documents with a username field matching a regular expression.
$joe_search = new MongoRegex("/j[o0]e/i");
$cursor = $collection->find(array("username" => $joe_search));
Смотрите также
- MongoRegex::__toString() - A string representation of this regular expression
Описание класса mongoregex, примеры использования класса mongoregex.
Описание на ru2.php.netОписание на php.ru