Match description of $regs and return value of (mb_)ereg(i)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339748 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2016-07-31 10:44:26 +00:00
parent 52d8a1c234
commit 19320e6c5f
4 changed files with 46 additions and 27 deletions

View file

@ -43,7 +43,17 @@
<term><parameter>regs</parameter></term>
<listitem>
<para>
Contains a substring of the matched <type>string</type>.
If matches are found for parenthesized substrings of
<parameter>pattern</parameter> and the function is called with the
third argument <parameter>regs</parameter>, the matches will be stored
in the elements of the array <parameter>regs</parameter>.
</para>
<para>
<varname>$regs[1]</varname> will contain the substring which starts at
the first left parenthesis; <varname>$regs[2]</varname> will contain
the substring starting at the second, and so on.
<varname>$regs[0]</varname> will contain a copy of the complete string
matched.
</para>
</listitem>
</varlistentry>
@ -53,16 +63,15 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Executes the regular expression
match with multibyte support, and returns <literal>1</literal> if matches are found.
If the optional <parameter>regs</parameter> parameter was specified, the function
returns the byte length of matched part, and the <type>array</type>
<parameter>regs</parameter> will contain the substring of matched
string. The function returns <literal>1</literal> if it matches with the empty
string. If no matches are found or an error happens, &false; will be
returned.
</simpara>
<para>
Returns the byte length of the matched string if a match for
<parameter>pattern</parameter> was found in <parameter>string</parameter>,
or &false; if no matches were found or an error occurred.
</para>
<para>
If the optional parameter <parameter>regs</parameter> was not passed or
the length of the matched string is <literal>0</literal>, this function returns <literal>1</literal>.
</para>
</refsect1>
<refsect1 role="notes">

View file

@ -43,7 +43,17 @@
<term><parameter>regs</parameter></term>
<listitem>
<para>
Contains a substring of the matched <type>string</type>.
If matches are found for parenthesized substrings of
<parameter>pattern</parameter> and the function is called with the
third argument <parameter>regs</parameter>, the matches will be stored
in the elements of the array <parameter>regs</parameter>.
</para>
<para>
<varname>$regs[1]</varname> will contain the substring which starts at
the first left parenthesis; <varname>$regs[2]</varname> will contain
the substring starting at the second, and so on.
<varname>$regs[0]</varname> will contain a copy of the complete string
matched.
</para>
</listitem>
</varlistentry>
@ -53,16 +63,15 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Executes the regular expression
match with multibyte support, and returns <literal>1</literal> if matches are found.
If the optional <parameter>regs</parameter> parameter was specified, the function
returns the byte length of matched part, and the <type>array</type>
<parameter>regs</parameter> will contain the substring of matched
string. The function returns <literal>1</literal> if it matches with the empty
string. If no matches are found or an error happens, &false; will be
returned.
</simpara>
<para>
Returns the byte length of the matched string if a match for
<parameter>pattern</parameter> was found in <parameter>string</parameter>,
or &false; if no matches were found or an error occurred.
</para>
<para>
If the optional parameter <parameter>regs</parameter> was not passed or
the length of the matched string is <literal>0</literal>, this function returns <literal>1</literal>.
</para>
</refsect1>
<refsect1 role="notes">

View file

@ -81,7 +81,7 @@
</para>
<para>
If the optional parameter <parameter>regs</parameter> was not passed or
the length of the matched string is 0, this function returns 1.
the length of the matched string is <literal>0</literal>, this function returns <literal>1</literal>.
</para>
</refsect1>

View file

@ -63,9 +63,10 @@
in the elements of the array <parameter>regs</parameter>.
</para>
<para>
$regs[1] will contain the substring which starts at the first left
parenthesis; $regs[2] will contain the substring starting at the
second, and so on. $regs[0] will contain a copy of the complete string
<varname>$regs[1]</varname> will contain the substring which starts at
the first left parenthesis; <varname>$regs[2]</varname> will contain
the substring starting at the second, and so on.
<varname>$regs[0]</varname> will contain a copy of the complete string
matched.
</para>
</listitem>
@ -83,7 +84,7 @@
</para>
<para>
If the optional parameter <parameter>regs</parameter> was not passed or
the length of the matched string is 0, this function returns 1.
the length of the matched string is <literal>0</literal>, this function returns <literal>1</literal>.
</para>
</refsect1>