MongoDB\BSON\Regex::__constructConstruct a new Regex
&reftitle.description;
finalpublicMongoDB\BSON\Regex::__constructstringpatternstringflags
&reftitle.parameters;
pattern (string)
The regular expression pattern.
The pattern should not be wrapped with delimiter characters.flags (string)
The regular
expression flags.
&reftitle.errors;
&mongodb.throws.argumentparsing;
&reftitle.examples;
MongoDB\BSON\Regex::__construct example
]]>
&example.outputs;
string(4) "^foo"
["flags"]=>
string(1) "i"
}
]]>
&reftitle.seealso;
BSON TypesSupported regular expression flags