mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
fixed bad definition of preg_quote.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28622 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b57996e30f
commit
a22938b130
1 changed files with 16 additions and 0 deletions
|
@ -388,6 +388,7 @@ $keywords = preg_split ("/[\s,]+/", "hypertext language, programming");
|
|||
<funcprototype>
|
||||
<funcdef>string <function>preg_quote</function></funcdef>
|
||||
<paramdef>string <parameter>str</parameter></paramdef>
|
||||
<paramdef>string <parameter><optional>delimiter</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -397,10 +398,25 @@ $keywords = preg_split ("/[\s,]+/", "hypertext language, programming");
|
|||
run-time string that you need to match in some text and the
|
||||
string may contain special regex characters.
|
||||
</para>
|
||||
<para>
|
||||
If the optional <parameter>delimiter</parameter> is specified, it
|
||||
will also be escaped. This is useful for escaping the delimeter
|
||||
that is required by the PCRE functions. The / is the most commonly
|
||||
used delimiter.</para>
|
||||
<para>
|
||||
The special regular expression characters are:
|
||||
<screen>. \\ + * ? [ ^ ] $ ( ) { } = ! < > | :</screen>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Examples:</title>
|
||||
<programlisting role="php">
|
||||
$keywords="$40 for a g3/400";
|
||||
$keywords = preg_quote ($keywords, "/");
|
||||
echo $keywords; // returns \$40 for a g3\/400
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue