<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.mb-regex-set-options" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>mb_regex_set_options</refname>
  <refpurpose>Set/Get the default options for mbregex functions</refpurpose>
 </refnamediv>
   
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>string</type><methodname>mb_regex_set_options</methodname>
   <methodparam choice="opt"><type>string</type><parameter>options</parameter><initializer>mb_regex_set_options()</initializer></methodparam>
  </methodsynopsis>
  <simpara>
   Sets the default options described by <parameter>options</parameter> 
   for multibyte regex functions.
  </simpara>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>options</parameter></term>
     <listitem>
      <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.
      </para>

      <table>
       <title>Regex options</title>
       <tgroup cols="4">
        <thead>
         <row>
          <entry>Option</entry>
          <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
          <entry>i</entry>
          <entry>Ambiguity match on</entry>
         </row>
         <row>
          <entry>x</entry>
          <entry>Enables extended pattern form</entry>
         </row>
         <row>
          <entry>m</entry>
          <entry><literal>'.'</literal> matches with newlines</entry>
         </row>
         <row>
          <entry>s</entry>
          <entry><literal>'^'</literal> -> <literal>'\A'</literal>, <literal>'$'</literal> -> <literal>'\Z'</literal></entry>
         </row>
         <row>
          <entry>p</entry>
          <entry>Same as both the <literal>m</literal> and <literal>s</literal> options</entry>
         </row>
         <row>
          <entry>l</entry>
          <entry>Finds longest matches</entry>
         </row>
         <row>
          <entry>n</entry>
          <entry>Ignores empty matches</entry>
         </row>
         <row>
          <entry>e</entry>
          <entry><function>eval</function> resulting code</entry>
         </row>
        </tbody>
       </tgroup>
      </table>
      <table>
       <title>Regex syntax modes</title>
       <tgroup cols="4">
        <thead>
         <row>
          <entry>Mode</entry>
          <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
          <entry>j</entry>
          <entry>Java (Sun java.util.regex)</entry>
         </row>
         <row>
          <entry>u</entry>
          <entry>GNU regex</entry>
         </row>
         <row>
          <entry>g</entry>
          <entry>grep</entry>
         </row>
         <row>
          <entry>c</entry>
          <entry>Emacs</entry>
         </row>
         <row>
          <entry>r</entry>
          <entry>Ruby</entry>
         </row>
         <row>
          <entry>z</entry>
          <entry>Perl</entry>
         </row>
         <row>
          <entry>b</entry>
          <entry>POSIX Basic regex</entry>
         </row>
         <row>
          <entry>d</entry>
          <entry>POSIX Extended regex</entry>
         </row>
        </tbody>
       </tgroup>
      </table>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   The previous options. If <parameter>options</parameter> is omitted, 
   it returns the <type>string</type> that describes the current options.
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>mb_split</function></member>
    <member><function>mb_ereg</function></member>
    <member><function>mb_eregi</function></member>
   </simplelist>
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->