(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));
?>