didou Fri Jun 15 00:16:44 2007 UTC
Modified files:
/phpdoc/en/reference/regex/functions ereg-replace.xml ereg.xml
eregi-replace.xml eregi.xml
split.xml spliti.xml
sql-regcase.xml
Log:
WS, prepare for new doc style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/ereg-replace.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/regex/functions/ereg-replace.xml
diff -u phpdoc/en/reference/regex/functions/ereg-replace.xml:1.6
phpdoc/en/reference/regex/functions/ereg-replace.xml:1.7
--- phpdoc/en/reference/regex/functions/ereg-replace.xml:1.6 Mon Dec 15
16:53:23 2003
+++ phpdoc/en/reference/regex/functions/ereg-replace.xml Fri Jun 15
00:16:44 2007
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
- <refentry id="function.ereg-replace">
- <refnamediv>
- <refname>ereg_replace</refname>
- <refpurpose>Replace regular expression</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>string</type><methodname>ereg_replace</methodname>
-
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
-
<methodparam><type>string</type><parameter>replacement</parameter></methodparam>
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- </methodsynopsis>
- <simpara>
- This function scans <parameter>string</parameter> for matches to
- <parameter>pattern</parameter>, then replaces the matched text
- with <parameter>replacement</parameter>.
- </simpara>
- <simpara>
- The modified string is returned. (Which may mean that the
- original string is returned if there are no matches to be
- replaced.)
- </simpara>
- <simpara>
- If <parameter>pattern</parameter> contains parenthesized
- substrings, <parameter>replacement</parameter> may contain
- substrings of the form
- <literal>\\<replaceable>digit</replaceable></literal>, which will
- be replaced by the text matching the digit'th parenthesized
- substring; <literal>\\0</literal> will produce the entire
- contents of string. Up to nine substrings may be used.
- Parentheses may be nested, in which case they are counted by the
- opening parenthesis.
- </simpara>
- <simpara>
- If no matches are found in <parameter>string</parameter>, then
- <parameter>string</parameter> will be returned unchanged.
- </simpara>
- <para>
- For example, the following code snippet prints "This was a test"
- three times:
- </para>
- <para>
- <example>
- <title><function>ereg_replace</function> example</title>
- <programlisting role="php">
+<refentry id="function.ereg-replace">
+ <refnamediv>
+ <refname>ereg_replace</refname>
+ <refpurpose>Replace regular expression</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>string</type><methodname>ereg_replace</methodname>
+ <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
+
<methodparam><type>string</type><parameter>replacement</parameter></methodparam>
+ <methodparam><type>string</type><parameter>string</parameter></methodparam>
+ </methodsynopsis>
+ <simpara>
+ This function scans <parameter>string</parameter> for matches to
+ <parameter>pattern</parameter>, then replaces the matched text
+ with <parameter>replacement</parameter>.
+ </simpara>
+ <simpara>
+ The modified string is returned. (Which may mean that the
+ original string is returned if there are no matches to be
+ replaced.)
+ </simpara>
+ <simpara>
+ If <parameter>pattern</parameter> contains parenthesized
+ substrings, <parameter>replacement</parameter> may contain
+ substrings of the form
+ <literal>\\<replaceable>digit</replaceable></literal>, which will
+ be replaced by the text matching the digit'th parenthesized
+ substring; <literal>\\0</literal> will produce the entire
+ contents of string. Up to nine substrings may be used.
+ Parentheses may be nested, in which case they are counted by the
+ opening parenthesis.
+ </simpara>
+ <simpara>
+ If no matches are found in <parameter>string</parameter>, then
+ <parameter>string</parameter> will be returned unchanged.
+ </simpara>
+ <para>
+ For example, the following code snippet prints "This was a test"
+ three times:
+ </para>
+ <para>
+ <example>
+ <title><function>ereg_replace</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -57,20 +57,20 @@
?>
]]>
- </programlisting>
- </example>
- </para>
- <para>
- One thing to take note of is that if you use an integer value as
- the <parameter>replacement</parameter> parameter, you may not get
- the results you expect. This is because
- <function>ereg_replace</function> will interpret the number as
- the ordinal value of a character, and apply that. For instance:
- </para>
- <para>
- <example>
- <title><function>ereg_replace</function> example</title>
- <programlisting role="php">
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ One thing to take note of is that if you use an integer value as
+ the <parameter>replacement</parameter> parameter, you may not get
+ the results you expect. This is because
+ <function>ereg_replace</function> will interpret the number as
+ the ordinal value of a character, and apply that. For instance:
+ </para>
+ <para>
+ <example>
+ <title><function>ereg_replace</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
/* This will not work as expected. */
@@ -86,36 +86,36 @@
echo $string; /* Output: 'This string has 4 words.' */
?>
]]>
- </programlisting>
- </example>
- </para>
- <para>
- <example>
- <title>Replace URLs with links</title>
- <programlisting role="php">
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example>
+ <title>Replace URLs with links</title>
+ <programlisting role="php">
<![CDATA[
<?php
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"<a href=\"\\0\">\\0</a>", $text);
?>
]]>
- </programlisting>
- </example>
- </para>
- <tip>
- <para>
- <function>preg_replace</function>, which uses a Perl-compatible
- regular expression syntax, is often a faster alternative to
- <function>ereg_replace</function>.
- </para>
- </tip>
- <para>
- See also <function>ereg</function>, <function>eregi</function>,
- <function>eregi_replace</function>, <function>str_replace</function>, and
- <function>preg_match</function>.
- </para>
- </refsect1>
- </refentry>
+ </programlisting>
+ </example>
+ </para>
+ <tip>
+ <para>
+ <function>preg_replace</function>, which uses a Perl-compatible
+ regular expression syntax, is often a faster alternative to
+ <function>ereg_replace</function>.
+ </para>
+ </tip>
+ <para>
+ See also <function>ereg</function>, <function>eregi</function>,
+ <function>eregi_replace</function>, <function>str_replace</function>, and
+ <function>preg_match</function>.
+ </para>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/ereg.xml?r1=1.12&r2=1.13&diff_format=u
Index: phpdoc/en/reference/regex/functions/ereg.xml
diff -u phpdoc/en/reference/regex/functions/ereg.xml:1.12
phpdoc/en/reference/regex/functions/ereg.xml:1.13
--- phpdoc/en/reference/regex/functions/ereg.xml:1.12 Wed Nov 10 08:30:41 2004
+++ phpdoc/en/reference/regex/functions/ereg.xml Fri Jun 15 00:16:44 2007
@@ -1,66 +1,66 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
- <refentry id="function.ereg">
- <refnamediv>
- <refname>ereg</refname>
- <refpurpose>Regular expression match</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>int</type><methodname>ereg</methodname>
-
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- <methodparam choice="opt"><type>array</type><parameter
role="reference">regs</parameter></methodparam>
- </methodsynopsis>
- <note>
- <para>
- <function>preg_match</function>, which uses a Perl-compatible
- regular expression syntax, is often a faster alternative to
- <function>ereg</function>.
- </para>
- </note>
- <simpara>
- Searches a <parameter>string</parameter> for matches to the regular
- expression given in <parameter>pattern</parameter> in a case-sensitive
- way.
- </simpara>
- <simpara>
- 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>. $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 matched.
- </simpara>
- <note>
- <simpara>
- Up to (and including) PHP 4.1.0 <varname>$regs</varname> will be
- filled with exactly ten elements, even though more or fewer than
- ten parenthesized substrings may actually have matched. This has
- no effect on <function>ereg</function>'s ability to match more
- substrings. If no matches are found, <literal>$regs</literal>
- will not be altered by <function>ereg</function>.
- </simpara>
- </note>
- <simpara>
- Returns the 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.
- If the optional parameter <parameter>regs</parameter> was not passed or
- the length of the matched string is 0, this function returns 1.
- </simpara>
- <para>
- The following code snippet takes a date in ISO format
- (YYYY-MM-DD) and prints it in DD.MM.YYYY format:
- </para>
- <para>
- <example>
- <title><function>ereg</function> example</title>
- <programlisting role="php">
+<refentry id="function.ereg">
+ <refnamediv>
+ <refname>ereg</refname>
+ <refpurpose>Regular expression match</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>int</type><methodname>ereg</methodname>
+ <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
+ <methodparam><type>string</type><parameter>string</parameter></methodparam>
+ <methodparam choice="opt"><type>array</type><parameter
role="reference">regs</parameter></methodparam>
+ </methodsynopsis>
+ <note>
+ <para>
+ <function>preg_match</function>, which uses a Perl-compatible
+ regular expression syntax, is often a faster alternative to
+ <function>ereg</function>.
+ </para>
+ </note>
+ <simpara>
+ Searches a <parameter>string</parameter> for matches to the regular
+ expression given in <parameter>pattern</parameter> in a case-sensitive
+ way.
+ </simpara>
+ <simpara>
+ 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>. $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 matched.
+ </simpara>
+ <note>
+ <simpara>
+ Up to (and including) PHP 4.1.0 <varname>$regs</varname> will be
+ filled with exactly ten elements, even though more or fewer than
+ ten parenthesized substrings may actually have matched. This has
+ no effect on <function>ereg</function>'s ability to match more
+ substrings. If no matches are found, <literal>$regs</literal>
+ will not be altered by <function>ereg</function>.
+ </simpara>
+ </note>
+ <simpara>
+ Returns the 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.
+ If the optional parameter <parameter>regs</parameter> was not passed or
+ the length of the matched string is 0, this function returns 1.
+ </simpara>
+ <para>
+ The following code snippet takes a date in ISO format
+ (YYYY-MM-DD) and prints it in DD.MM.YYYY format:
+ </para>
+ <para>
+ <example>
+ <title><function>ereg</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) {
@@ -70,16 +70,16 @@
}
?>
]]>
- </programlisting>
- </example>
- </para>
- <para>
- See also <function>eregi</function>, <function>ereg_replace</function>,
- <function>eregi_replace</function>, <function>preg_match</function>,
- <function>strpos</function>, and <function>strstr</function>.
- </para>
- </refsect1>
- </refentry>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ See also <function>eregi</function>, <function>ereg_replace</function>,
+ <function>eregi_replace</function>, <function>preg_match</function>,
+ <function>strpos</function>, and <function>strstr</function>.
+ </para>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/eregi-replace.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/regex/functions/eregi-replace.xml
diff -u phpdoc/en/reference/regex/functions/eregi-replace.xml:1.6
phpdoc/en/reference/regex/functions/eregi-replace.xml:1.7
--- phpdoc/en/reference/regex/functions/eregi-replace.xml:1.6 Thu Aug 19
12:14:46 2004
+++ phpdoc/en/reference/regex/functions/eregi-replace.xml Fri Jun 15
00:16:44 2007
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
- <refentry id="function.eregi-replace">
- <refnamediv>
- <refname>eregi_replace</refname>
- <refpurpose>Replace regular expression case insensitive</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>string</type><methodname>eregi_replace</methodname>
-
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
-
<methodparam><type>string</type><parameter>replacement</parameter></methodparam>
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- </methodsynopsis>
- <para>
- This function is identical to <function>ereg_replace</function>
- except that this ignores case distinction when matching
- alphabetic characters.
- </para>
- <para>
- <example>
- <title>Highlight search results</title>
- <programlisting role="php">
+<refentry id="function.eregi-replace">
+ <refnamediv>
+ <refname>eregi_replace</refname>
+ <refpurpose>Replace regular expression case insensitive</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>string</type><methodname>eregi_replace</methodname>
+ <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
+
<methodparam><type>string</type><parameter>replacement</parameter></methodparam>
+ <methodparam><type>string</type><parameter>string</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ This function is identical to <function>ereg_replace</function>
+ except that this ignores case distinction when matching
+ alphabetic characters.
+ </para>
+ <para>
+ <example>
+ <title>Highlight search results</title>
+ <programlisting role="php">
<![CDATA[
<?php
$pattern = '(>[^<]*)('. quotemeta($_GET['search']) .')';
@@ -30,15 +30,15 @@
$body = eregi_replace($pattern, $replacement, $body);
?>
]]>
- </programlisting>
- </example>
- </para>
- <para>
- See also <function>ereg</function>, <function>eregi</function>,
- and <function>ereg_replace</function>.
- </para>
- </refsect1>
- </refentry>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ See also <function>ereg</function>, <function>eregi</function>,
+ and <function>ereg_replace</function>.
+ </para>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/eregi.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/regex/functions/eregi.xml
diff -u phpdoc/en/reference/regex/functions/eregi.xml:1.9
phpdoc/en/reference/regex/functions/eregi.xml:1.10
--- phpdoc/en/reference/regex/functions/eregi.xml:1.9 Wed Nov 10 08:30:41 2004
+++ phpdoc/en/reference/regex/functions/eregi.xml Fri Jun 15 00:16:44 2007
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
- <refentry id="function.eregi">
- <refnamediv>
- <refname>eregi</refname>
- <refpurpose>Case insensitive regular expression match</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>int</type><methodname>eregi</methodname>
-
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- <methodparam choice="opt"><type>array</type><parameter
role="reference">regs</parameter></methodparam>
- </methodsynopsis>
- <para>
- This function is identical to <function>ereg</function> except
- that this ignores case distinction when matching alphabetic
- characters.
- </para>
- <para>
- <example>
- <title><function>eregi</function> example</title>
- <programlisting role="php">
+<refentry id="function.eregi">
+ <refnamediv>
+ <refname>eregi</refname>
+ <refpurpose>Case insensitive regular expression match</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>int</type><methodname>eregi</methodname>
+ <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
+ <methodparam><type>string</type><parameter>string</parameter></methodparam>
+ <methodparam choice="opt"><type>array</type><parameter
role="reference">regs</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ This function is identical to <function>ereg</function> except
+ that this ignores case distinction when matching alphabetic
+ characters.
+ </para>
+ <para>
+ <example>
+ <title><function>eregi</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
$string = 'XYZ';
@@ -31,16 +31,16 @@
}
?>
]]>
- </programlisting>
- </example>
- </para>
- <para>
- See also <function>ereg</function>, <function>ereg_replace</function>,
- <function>eregi_replace</function>, <function>stripos</function>, and
- <function>stristr</function>.
- </para>
- </refsect1>
- </refentry>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ See also <function>ereg</function>, <function>ereg_replace</function>,
+ <function>eregi_replace</function>, <function>stripos</function>, and
+ <function>stristr</function>.
+ </para>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/split.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/regex/functions/split.xml
diff -u phpdoc/en/reference/regex/functions/split.xml:1.6
phpdoc/en/reference/regex/functions/split.xml:1.7
--- phpdoc/en/reference/regex/functions/split.xml:1.6 Fri Dec 2 09:35:27 2005
+++ phpdoc/en/reference/regex/functions/split.xml Fri Jun 15 00:16:44 2007
@@ -1,71 +1,71 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.7 -->
- <refentry id="function.split">
- <refnamediv>
- <refname>split</refname>
- <refpurpose>Split string into array by regular expression</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>array</type><methodname>split</methodname>
-
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- <methodparam
choice="opt"><type>int</type><parameter>limit</parameter></methodparam>
- </methodsynopsis>
- <tip>
- <para>
- <function>preg_split</function>, which uses a Perl-compatible regular
- expression syntax, is often a faster alternative to
- <function>split</function>. If you don't require the power of regular
- expressions, it is faster to use <function>explode</function>, which
- doesn't incur the overhead of the regular expression engine.
- </para>
- </tip>
- <para>
- Returns an array of strings, each of which is a substring of
- <parameter>string</parameter> formed by splitting it on
- boundaries formed by the case-sensitive regular expression
- <parameter>pattern</parameter>. If <parameter>limit</parameter>
- is set, the returned array will contain a maximum of
- <parameter>limit</parameter> elements with the last element
- containing the whole rest of <parameter>string</parameter>. If
- an error occurs, <function>split</function> returns &false;.
- </para>
- <para>
- To split off the first four fields from a line from
- <filename>/etc/passwd</filename>:
- </para>
- <para>
- <example>
- <title><function>split</function> example</title>
- <programlisting role="php">
+<refentry id="function.split">
+ <refnamediv>
+ <refname>split</refname>
+ <refpurpose>Split string into array by regular expression</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>array</type><methodname>split</methodname>
+ <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
+ <methodparam><type>string</type><parameter>string</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>limit</parameter></methodparam>
+ </methodsynopsis>
+ <tip>
+ <para>
+ <function>preg_split</function>, which uses a Perl-compatible regular
+ expression syntax, is often a faster alternative to
+ <function>split</function>. If you don't require the power of regular
+ expressions, it is faster to use <function>explode</function>, which
+ doesn't incur the overhead of the regular expression engine.
+ </para>
+ </tip>
+ <para>
+ Returns an array of strings, each of which is a substring of
+ <parameter>string</parameter> formed by splitting it on
+ boundaries formed by the case-sensitive regular expression
+ <parameter>pattern</parameter>. If <parameter>limit</parameter>
+ is set, the returned array will contain a maximum of
+ <parameter>limit</parameter> elements with the last element
+ containing the whole rest of <parameter>string</parameter>. If
+ an error occurs, <function>split</function> returns &false;.
+ </para>
+ <para>
+ To split off the first four fields from a line from
+ <filename>/etc/passwd</filename>:
+ </para>
+ <para>
+ <example>
+ <title><function>split</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
list($user, $pass, $uid, $gid, $extra) =
split(":", $passwd_line, 5);
?>
]]>
- </programlisting>
- </example>
- </para>
- <simpara>
- If there are <replaceable>n</replaceable> occurrences of
- <parameter>pattern</parameter>, the returned array will contain
- <literal><replaceable>n</replaceable>+1</literal> items. For example, if
- there is no occurrence of <parameter>pattern</parameter>, an array with
- only one element will be returned. Of course, this is also true if
- <parameter>string</parameter> is empty.
- </simpara>
- <para>
- To parse a date which may be delimited with slashes, dots, or
- hyphens:
- </para>
- <para>
- <example>
- <title><function>split</function> example</title>
- <programlisting role="php">
+ </programlisting>
+ </example>
+ </para>
+ <simpara>
+ If there are <replaceable>n</replaceable> occurrences of
+ <parameter>pattern</parameter>, the returned array will contain
+ <literal><replaceable>n</replaceable>+1</literal> items. For example, if
+ there is no occurrence of <parameter>pattern</parameter>, an array with
+ only one element will be returned. Of course, this is also true if
+ <parameter>string</parameter> is empty.
+ </simpara>
+ <para>
+ To parse a date which may be delimited with slashes, dots, or
+ hyphens:
+ </para>
+ <para>
+ <example>
+ <title><function>split</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
// Delimiters may be slash, dot, or hyphen
@@ -74,38 +74,38 @@
echo "Month: $month; Day: $day; Year: $year<br />\n";
?>
]]>
- </programlisting>
- </example>
- </para>
+ </programlisting>
+ </example>
+ </para>
- <para>
- For users looking for a way to emulate Perl's <command>@chars =
- split('', $str)</command> behaviour, please see the examples for
- <function>preg_split</function> or <function>str_split</function>.
- </para>
+ <para>
+ For users looking for a way to emulate Perl's <command>@chars =
+ split('', $str)</command> behaviour, please see the examples for
+ <function>preg_split</function> or <function>str_split</function>.
+ </para>
- <para>
- Please note that <parameter>pattern</parameter> is a regular
- expression. If you want to split on any of the characters which
- are considered special by regular expressions, you'll need to
- escape them first. If you think <function>split</function> (or
- any other regex function, for that matter) is doing something
- weird, please read the file <filename>regex.7</filename>,
- included in the <filename>regex/</filename> subdirectory of the
- PHP distribution. It's in manpage format, so you'll want to do
- something along the lines of <command>man
- /usr/local/src/regex/regex.7</command> in order to read it.
- </para>
+ <para>
+ Please note that <parameter>pattern</parameter> is a regular
+ expression. If you want to split on any of the characters which
+ are considered special by regular expressions, you'll need to
+ escape them first. If you think <function>split</function> (or
+ any other regex function, for that matter) is doing something
+ weird, please read the file <filename>regex.7</filename>,
+ included in the <filename>regex/</filename> subdirectory of the
+ PHP distribution. It's in manpage format, so you'll want to do
+ something along the lines of <command>man
+ /usr/local/src/regex/regex.7</command> in order to read it.
+ </para>
- <para>
- See also: <function>preg_split</function>, <function>spliti</function>,
- <function>str_split</function>,
- <function>explode</function>, <function>implode</function>,
- <function>chunk_split</function>, and <function>wordwrap</function>.
- </para>
+ <para>
+ See also: <function>preg_split</function>, <function>spliti</function>,
+ <function>str_split</function>,
+ <function>explode</function>, <function>implode</function>,
+ <function>chunk_split</function>, and <function>wordwrap</function>.
+ </para>
- </refsect1>
- </refentry>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/spliti.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/regex/functions/spliti.xml
diff -u phpdoc/en/reference/regex/functions/spliti.xml:1.6
phpdoc/en/reference/regex/functions/spliti.xml:1.7
--- phpdoc/en/reference/regex/functions/spliti.xml:1.6 Mon Sep 27 15:53:29 2004
+++ phpdoc/en/reference/regex/functions/spliti.xml Fri Jun 15 00:16:44 2007
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
<refentry id="function.spliti">
<refnamediv>
<refname>spliti</refname>
- <refpurpose>
- Split string into array by regular expression case insensitive
- </refpurpose>
+ <refpurpose>Split string into array by regular expression case
insensitive</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -39,7 +37,7 @@
<![CDATA[
Array
(
- [0] =>
+ [0] =>
[1] => BBB
[2] => CCC
[3] => DDD
@@ -48,7 +46,7 @@
]]>
</screen>
</example>
- </para>
+ </para>
<para>
See also <function>preg_split</function>, <function>split</function>,
<function>explode</function>, and <function>implode</function>.
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/sql-regcase.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/regex/functions/sql-regcase.xml
diff -u phpdoc/en/reference/regex/functions/sql-regcase.xml:1.6
phpdoc/en/reference/regex/functions/sql-regcase.xml:1.7
--- phpdoc/en/reference/regex/functions/sql-regcase.xml:1.6 Sun Jan 23
20:24:35 2005
+++ phpdoc/en/reference/regex/functions/sql-regcase.xml Fri Jun 15 00:16:44 2007
@@ -1,50 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
- <refentry id="function.sql-regcase">
- <refnamediv>
- <refname>sql_regcase</refname>
- <refpurpose>
- Make regular expression for case insensitive match
- </refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>string</type><methodname>sql_regcase</methodname>
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
- </methodsynopsis>
- <para>
- Returns a valid regular expression which will match
- <parameter>string</parameter>, ignoring case. This expression is
- <parameter>string</parameter> with each alphabetic character converted to
a
- bracket expression; this bracket expression contains that
- character's uppercase and lowercase form. Other characters remain
unchanged.
- </para>
- <para>
- <example>
- <title><function>sql_regcase</function> example</title>
- <programlisting role="php">
+<refentry id="function.sql-regcase">
+ <refnamediv>
+ <refname>sql_regcase</refname>
+ <refpurpose>Make regular expression for case insensitive match</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>string</type><methodname>sql_regcase</methodname>
+ <methodparam><type>string</type><parameter>string</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Returns a valid regular expression which will match
+ <parameter>string</parameter>, ignoring case. This expression is
+ <parameter>string</parameter> with each alphabetic character converted to a
+ bracket expression; this bracket expression contains that
+ character's uppercase and lowercase form. Other characters remain
unchanged.
+ </para>
+ <para>
+ <example>
+ <title><function>sql_regcase</function> example</title>
+ <programlisting role="php">
<![CDATA[
<?php
echo sql_regcase("Foo - bar.");
?>
]]>
- </programlisting>
- &example.outputs;
- <screen>
+ </programlisting>
+ &example.outputs;
+ <screen>
<![CDATA[
[Ff][Oo][Oo] - [Bb][Aa][Rr].
]]>
- </screen>
- </example>
- </para>
- <para>
- This can be used to achieve case insensitive pattern matching in
- products which support only case sensitive regular expressions.
- </para>
- </refsect1>
- </refentry>
+ </screen>
+ </example>
+ </para>
+ <para>
+ This can be used to achieve case insensitive pattern matching in
+ products which support only case sensitive regular expressions.
+ </para>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml