Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 4669

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set/Get the default options for mbregex functions</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-regex-encoding.html">mb_regex_encoding</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mb-scrub.html">mb_scrub</a></div>
 <div class="up"><a href="ref.mbstring.html">Multibyte String Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.mb-regex-set-options" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_regex_set_options</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">mb_regex_set_options</span> &mdash; <span class="dc-title">Set/Get the default options for mbregex functions</span></p>

 </div>
   
 <div class="refsect1 description" id="refsect1-function.mb-regex-set-options-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>mb_regex_set_options</strong></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$options</code><span class="initializer"> = mb_regex_set_options()</span></span>
  ] )</div>

  <p class="simpara">
   Sets the default options described by <code class="parameter">options</code> 
   for multibyte regex functions.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-regex-set-options-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">options</code></dt>

     <dd>

      <p class="para">
       The options to set. This is a string where each 
       character is an option. To set a mode, the mode 
       character must be the last one set, however there 
       can only be set one mode but multiple options.
      </p>

      <table class="doctable table">
       <caption><strong>Regex options</strong></caption>
       
        <thead>
         <tr>
          <th>Option</th>
          <th>Meaning</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>i</td>
          <td>Ambiguity match on</td>
         </tr>

         <tr>
          <td>x</td>
          <td>Enables extended pattern form</td>
         </tr>

         <tr>
          <td>m</td>
          <td><em>&#039;.&#039;</em> matches with newlines</td>
         </tr>

         <tr>
          <td>s</td>
          <td><em>&#039;^&#039;</em> -&gt; <em>&#039;\A&#039;</em>, <em>&#039;$&#039;</em> -&gt; <em>&#039;\Z&#039;</em></td>
         </tr>

         <tr>
          <td>p</td>
          <td>Same as both the <em>m</em> and <em>s</em> options</td>
         </tr>

         <tr>
          <td>l</td>
          <td>Finds longest matches</td>
         </tr>

         <tr>
          <td>n</td>
          <td>Ignores empty matches</td>
         </tr>

         <tr>
          <td>e</td>
          <td><span class="function"><a href="function.eval.html" class="function">eval()</a></span> resulting code</td>
         </tr>

        </tbody>
       
      </table>

      <table class="doctable table">
       <caption><strong>Regex syntax modes</strong></caption>
       
        <thead>
         <tr>
          <th>Mode</th>
          <th>Meaning</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>j</td>
          <td>Java (Sun java.util.regex)</td>
         </tr>

         <tr>
          <td>u</td>
          <td>GNU regex</td>
         </tr>

         <tr>
          <td>g</td>
          <td>grep</td>
         </tr>

         <tr>
          <td>c</td>
          <td>Emacs</td>
         </tr>

         <tr>
          <td>r</td>
          <td>Ruby</td>
         </tr>

         <tr>
          <td>z</td>
          <td>Perl</td>
         </tr>

         <tr>
          <td>b</td>
          <td>POSIX Basic regex</td>
         </tr>

         <tr>
          <td>d</td>
          <td>POSIX Extended regex</td>
         </tr>

        </tbody>
       
      </table>

     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mb-regex-set-options-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   The previous options. If <code class="parameter">options</code> is omitted, 
   it returns the <span class="type"><a href="language.types.string.html" class="type string">string</a></span> that describes the current options.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-regex-set-options-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.mb-split.html" class="function" rel="rdfs-seeAlso">mb_split()</a> - Split multibyte string using regular expression</span></li>
    <li class="member"><span class="function"><a href="function.mb-ereg.html" class="function" rel="rdfs-seeAlso">mb_ereg()</a> - Regular expression match with multibyte support</span></li>
    <li class="member"><span class="function"><a href="function.mb-eregi.html" class="function" rel="rdfs-seeAlso">mb_eregi()</a> - Regular expression match ignoring case with multibyte support</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-regex-encoding.html">mb_regex_encoding</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mb-scrub.html">mb_scrub</a></div>
 <div class="up"><a href="ref.mbstring.html">Multibyte String Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>