downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/class.mongoregex.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/book.mongo.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'class.mongoregex.php',
   
1 => 'MongoRegex',
  ),
 
'up' =>
  array (
   
0 => 'book.mongo.php',
   
1 => 'Mongo',
  ),
 
'prev' =>
  array (
   
0 => 'mongodate.tostring.php',
   
1 => 'MongoDate::__toString',
  ),
 
'next' =>
  array (
   
0 => 'mongoregex.construct.php',
   
1 => 'MongoRegex::__construct',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div>

 <h1 class="title">The MongoRegex class</h1>
 

 <div class="partintro">


  <div id="mongoregex.intro" class="section">
   <h2 class="title">Introduction</h2>
   <p class="para">
    This class can be used to create regular expressions.  Typically, these
    expressions will be used to query the database and find matching strings.
    More unusually, they can be saved to the database and retrieved.
   </p>
   <p class="para">
    Mongo recognizes six regular expression flags:
   </p>
   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      <i>i</i>
     </p>
     <p class="para">
      Case insensitive
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <i>m</i>
     </p>
     <p class="para">
      Multiline
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <i>x</i>
     </p>
     <p class="para">
      Can contain comments
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <i>l</i>
     </p>
     <p class="para">
      locale
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <i>s</i>
     </p>
     <p class="para">
      dotall, &quot;.&quot; matches everything, including newlines
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <i>u</i>
     </p>
     <p class="para">
      match unicode
     </p>
    </li>
   </ul>
  </div>


  <div id="mongoregex.synopsis" class="section">
   <h2 class="title">Class synopsis</h2>


   <div class="classsynopsis">
    <div class="ooclass"><b class="classname">MongoRegex</b></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <b class="classname">MongoRegex</b>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Fields */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname">$regex</var>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname">$flags</var>
    ;</div>

   
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
    <span class="methodname"><a href="mongoregex.construct.php" class="function">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$regex</tt></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><a href="mongoregex.tostring.php" class="function">__toString</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>


  </div>

 </div>

 















<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="mongoregex.construct.php">MongoRegex::__construct</a> — Creates a new regular expression</li><li><a href="mongoregex.tostring.php">MongoRegex::__toString</a> — A string representation of this regular expression</li></ul>
</div>
<?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites