cvs: /phpdoc/functions regex.sgml

From: Date: Mon, 15 Nov 1999 23:43:44 +0000
Subject: cvs: /phpdoc/functions regex.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-12581@lists.php.net to get a copy of this message
cslawi Mon Nov 15 18:43:44 1999 EDT Modified files: /phpdoc/functions regex.sgml Log: A couple of clarifications to split(). Still need to add a better example. Index: phpdoc/functions/regex.sgml diff -u phpdoc/functions/regex.sgml:1.4 phpdoc/functions/regex.sgml:1.5 --- phpdoc/functions/regex.sgml:1.4 Wed Oct 20 18:41:42 1999 +++ phpdoc/functions/regex.sgml Mon Nov 15 18:43:14 1999 @@ -246,8 +246,10 @@ </funcsynopsis> <para> Returns an array of strings, each of which is a substring of - string formed by splitting it on boundaries formed - by <parameter>pattern</parameter>. If an error occurs, returns false.</para> + string formed by splitting it on boundaries formed by the regular + expression <parameter>pattern</parameter>. If an error occurs, + returns false. + </para> <para> To get the first five fields from a line from @@ -259,8 +261,23 @@ </programlisting></example></para> <para> Note that <parameter>pattern</parameter> is case-sensitive.</para> + + <para> + Note that 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> + + <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. + </para> + <para> - See also: <function>explode</function> and <function>implode</function>.</para> + See also: <function>explode</function> and <function>implode</function>. + </para> </refsect1> </refentry>

« previous php.dev (#12581) next »