mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Delimiter cannot be backslash. Grammar.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293304 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
47610a5ee4
commit
9a55225d8b
1 changed files with 8 additions and 8 deletions
|
@ -30,8 +30,8 @@
|
|||
<title>Delimiters</title>
|
||||
<para>
|
||||
When using the PCRE functions, it is required that the pattern is enclosed
|
||||
in <emphasis>delimiters</emphasis>. A delimiter can be any non-alphanumeric,
|
||||
non-whitespace character.
|
||||
by <emphasis>delimiters</emphasis>. A delimiter can be any non-alphanumeric,
|
||||
non-backslash, non-whitespace character.
|
||||
</para>
|
||||
<para>
|
||||
Often used delimiters are forward slashes (<literal>/</literal>), hash
|
||||
|
@ -47,9 +47,9 @@
|
|||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
If the delimiter needs to be matched inside the pattern it will have to be
|
||||
If the delimiter needs to be matched inside the pattern it must be
|
||||
escaped using a backslash. If the delimiter appears often inside the
|
||||
pattern, it is a good idea choosing another delimiter to increase
|
||||
pattern, it is a good idea to choose another delimiter in order to increase
|
||||
readability.
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
|
@ -57,12 +57,12 @@
|
|||
#http://#
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
The <function>preg_quote</function> function may be used to inject a string
|
||||
into a pattern and its second parameter allows to specify the chosen
|
||||
delimiter so it will be escaped as well.
|
||||
The <function>preg_quote</function> function may be used to escape a string
|
||||
for injection into a pattern and its optional second parameter may be used
|
||||
to specify the delimiter to be escaped.
|
||||
</para>
|
||||
<para>
|
||||
In addition to the aforementioned delimiters, it is also possible using
|
||||
In addition to the aforementioned delimiters, it is also possible to use
|
||||
bracket style delimiters where the opening and closing brackets are the
|
||||
starting and ending delimiter, respectively.
|
||||
<informalexample>
|
||||
|
|
Loading…
Reference in a new issue