(PECL mongo >= 0.8.1)
MongoRegex::__construct — 锟斤拷锟斤拷一锟斤拷锟铰碉拷锟斤拷锟斤拷锟斤拷式
This extension that defines this method is deprecated. Instead, the MongoDB extension should be used. Alternatives to this method include:
$regex
)锟斤拷锟斤拷一锟斤拷锟铰碉拷锟斤拷锟斤拷锟斤拷式锟斤拷
regex
锟斤拷 /expr/flags 锟斤拷式锟斤拷锟斤拷锟斤拷锟斤拷式锟街凤拷锟斤拷锟斤拷
锟斤拷锟斤拷一锟斤拷锟铰碉拷锟斤拷锟斤拷锟斤拷式锟斤拷
Example #1 MongoRegex::__construct() 锟斤拷锟斤拷
锟斤拷锟斤拷锟斤拷锟绞癸拷锟斤拷锟斤拷锟斤拷锟斤拷锟绞斤拷锟斤拷锟窖拷锟斤拷锟狡ワ拷锟斤拷锟斤拷锟斤拷锟绞斤拷锟斤拷锟斤拷锟斤拷牡锟斤拷锟斤拷没锟斤拷锟斤拷侄锟斤拷锟� (^) 锟斤拷始锟斤拷一锟斤拷 l 锟斤拷一锟斤拷元锟斤拷锟斤拷母 ([aeiouy])锟斤拷锟斤拷小写锟斤拷锟斤拷锟斤拷 (/i)锟斤拷
<?php
$luke_search = new MongoRegex("/^l[aeiouy]/i");
$cursor = $collection->find(array("username" => $luke_search));
?>