svn: /phpdoc/en/trunk/reference/mbstring/functions/ mb-regex-set-options.xml
| From: | Kalle Sommer Nielsen | Date: | Thu, 07 Jan 2010 12:15:14 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mbstring/functions/ mb-regex-set-options.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5779@lists.php.net to get a copy of this message | ||
kalle Thu, 07 Jan 2010 12:15:14 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=293213
Log:
Fixed bug #50316 (mb-regex options have to be documented)
# Modifier details taken from the Oniguruma API
# http://www.geocities.jp/kosako3/oniguruma/doc/API.txt
Bug: http://bugs.php.net/50316 (Open) mb-regex options have
to be documented
Changed paths:
U phpdoc/en/trunk/reference/mbstring/functions/mb-regex-set-options.xml
Modified: phpdoc/en/trunk/reference/mbstring/functions/mb-regex-set-options.xml
===================================================================
--- phpdoc/en/trunk/reference/mbstring/functions/mb-regex-set-options.xml 2010-01-07 11:23:39 UTC
(rev 293212)
+++ phpdoc/en/trunk/reference/mbstring/functions/mb-regex-set-options.xml 2010-01-07 12:15:14 UTC
(rev 293213)
@@ -26,8 +26,102 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
- The options to set.
+ The options to set. This is a 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>