<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/reference.pcre.pattern.syntax.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'regexp.reference.delimiters.php',
    1 => 'Delimitatori',
    2 => 'Delimitatori',
  ),
  'up' => 
  array (
    0 => 'reference.pcre.pattern.syntax.php',
    1 => 'Sintassi delle regex PCRE',
  ),
  'prev' => 
  array (
    0 => 'regexp.introduction.php',
    1 => 'Introduzione',
  ),
  'next' => 
  array (
    0 => 'regexp.reference.meta.php',
    1 => 'Meta-caratteri',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/pcre/pattern.syntax.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="regexp.reference.delimiters" class="section">
  <h2 class="title">Delimitatori</h2>
  <p class="para">
   Quando si usano le funzioni PCRE, il pattern deve essere racchiuso
   da <em>delimitatori</em>. Un delimitatore può essere qualsiasi carattere
   non alfanumerico, esclusi il backslash e i caratteri di spazio (spazio, tab, ecc.).
  </p>
  <p class="para">
   Delimitatori usati spesso sono la barra &quot;slash&quot; (<code class="literal">/</code>), il cancelletto &quot;hash&quot;
   (<code class="literal">#</code>) e la tilde (<code class="literal">~</code>). I
   seguenti sono esempi di delimitazioni valide dei pattern:
   <div class="informalexample">
    <div class="example-contents">
<div class="cdata"><pre>
/foo bar/
#^[^0-9]$#
+php+
%[a-zA-Z0-9_-]%
</pre></div>
    </div>

   </div>
  </p>
  <p class="para">
   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 to choose another delimiter in order to increase
   readability.
   <div class="informalexample">
    <div class="example-contents">
<div class="cdata"><pre>
/http:\/\//
#http://#
</pre></div>
    </div>

   </div>
   The <span class="function"><a href="function.preg-quote.php" class="function">preg_quote()</a></span> 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.
  </p>
  <p class="para">
   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.
   <div class="informalexample">
    <div class="example-contents">
<div class="cdata"><pre>
{this is a pattern}
</pre></div>
    </div>

   </div>
  </p>
  <p class="para">
   You may add <a href="reference.pcre.pattern.modifiers.php" class="link">pattern
   modifiers</a> after the ending delimiter. The following is an example
   of case-insensitive matching:
   <div class="informalexample">
    <div class="example-contents">
<div class="cdata"><pre>
#[a-z]#i
</pre></div>
    </div>

   </div>
  </p>
 </div><?php manual_footer($setup); ?>