<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/spl.iterators.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'class.regexiterator.php',
    1 => 'RegexIterator',
    2 => 'The RegexIterator class',
  ),
  'up' => 
  array (
    0 => 'spl.iterators.php',
    1 => 'Iterators',
  ),
  'prev' => 
  array (
    0 => 'recursivetreeiterator.valid.php',
    1 => 'RecursiveTreeIterator::valid',
  ),
  'next' => 
  array (
    0 => 'regexiterator.accept.php',
    1 => 'RegexIterator::accept',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/regexiterator.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.regexiterator.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.regexiterator" class="reference">
 <h1 class="title">The RegexIterator class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p>


  <div class="section" id="regexiterator.intro">
   <h2 class="title">Einführung</h2>
   <p class="para">
    This iterator can be used to filter another iterator based on a regular expression.
   </p>
  </div>


  <div class="section" id="regexiterator.synopsis">
   <h2 class="title">Klassenbeschreibung</h2>


   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">RegexIterator</strong></strong>
    

    
     <span class="modifier">extends</span>
      <a href="class.filteriterator.php" class="classname">FilterIterator</a>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Konstanten */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.use-key"><var class="varname">USE_KEY</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.invert-match"><var class="varname">INVERT_MATCH</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.match"><var class="varname">MATCH</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.get-match"><var class="varname">GET_MATCH</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.all-matches"><var class="varname">ALL_MATCHES</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.split"><var class="varname">SPLIT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.regexiterator.php#regexiterator.constants.replace"><var class="varname">REPLACE</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Eigenschaften */</div>
    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.regexiterator.php#regexiterator.props.replacement">$<var class="varname">replacement</var></a></var><span class="initializer"> = null</span>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methoden */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="regexiterator.construct.php" class="methodname">__construct</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.iterator.php" class="type Iterator">Iterator</a></span> <code class="parameter">$iterator</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$pattern</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code><span class="initializer"> = <strong><code><a href="class.regexiterator.php#regexiterator.constants.match">RegexIterator::MATCH</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$pregFlags</code><span class="initializer"> = 0</span></span><br>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.accept.php" class="methodname">accept</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.getflags.php" class="methodname">getFlags</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.getmode.php" class="methodname">getMode</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.getpregflags.php" class="methodname">getPregFlags</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.getregex.php" class="methodname">getRegex</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.setflags.php" class="methodname">setFlags</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.setmode.php" class="methodname">setMode</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="regexiterator.setpregflags.php" class="methodname">setPregFlags</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$pregFlags</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Geerbte Methoden */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="filteriterator.accept.php" class="methodname">FilterIterator::accept</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="filteriterator.current.php" class="methodname">FilterIterator::current</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="filteriterator.key.php" class="methodname">FilterIterator::key</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="filteriterator.next.php" class="methodname">FilterIterator::next</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="filteriterator.rewind.php" class="methodname">FilterIterator::rewind</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="filteriterator.valid.php" class="methodname">FilterIterator::valid</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.current.php" class="methodname">IteratorIterator::current</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.getinneriterator.php" class="methodname">IteratorIterator::getInnerIterator</a></span>(): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.iterator.php" class="type Iterator">Iterator</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.key.php" class="methodname">IteratorIterator::key</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.next.php" class="methodname">IteratorIterator::next</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.rewind.php" class="methodname">IteratorIterator::rewind</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.valid.php" class="methodname">IteratorIterator::valid</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   }</div>

  </div>

  <div class="section" id="regexiterator.constants">
   <h2 class="title">Vordefinierte Konstanten</h2>
   <div class="section" id="regexiterator.constants.operation-modes">
    <h2 class="title">RegexIterator operation modes</h2>
    <dl>

     
      <dt id="regexiterator.constants.all-matches"><strong><code><a href="class.regexiterator.php#regexiterator.constants.all-matches">RegexIterator::ALL_MATCHES</a></code></strong></dt>
      <dd>
       <p class="para">
        Return all matches for the current entry 
        (see <span class="function"><a href="function.preg-match-all.php" class="function">preg_match_all()</a></span>).
       </p>
      </dd>
     

     
      <dt id="regexiterator.constants.get-match"><strong><code><a href="class.regexiterator.php#regexiterator.constants.get-match">RegexIterator::GET_MATCH</a></code></strong></dt>
      <dd>
       <p class="para">
        Return the first match for the current entry 
        (see <span class="function"><a href="function.preg-match.php" class="function">preg_match()</a></span>).
       </p>
      </dd>
     

     
      <dt id="regexiterator.constants.match"><strong><code><a href="class.regexiterator.php#regexiterator.constants.match">RegexIterator::MATCH</a></code></strong></dt>
      <dd>
       <p class="para">
        Only execute match (filter) for the current entry 
        (see <span class="function"><a href="function.preg-match.php" class="function">preg_match()</a></span>).
       </p>
      </dd>
     

     
      <dt id="regexiterator.constants.replace"><strong><code><a href="class.regexiterator.php#regexiterator.constants.replace">RegexIterator::REPLACE</a></code></strong></dt>
      <dd>
       <p class="para">
        Replace the current entry 
        (see <span class="function"><a href="function.preg-replace.php" class="function">preg_replace()</a></span>; Not fully implemented yet)
       </p>
      </dd>
     

     
      <dt id="regexiterator.constants.split"><strong><code><a href="class.regexiterator.php#regexiterator.constants.split">RegexIterator::SPLIT</a></code></strong></dt>
      <dd>
       <p class="para">
        Returns the split values for the current entry (see <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span>).
       </p>
      </dd>
     
    </dl>
   </div>
   <div class="section" id="regexiterator.constants.flags">
    <h2 class="title">RegexIterator Flags</h2>
    <dl>
     
      <dt id="regexiterator.constants.use-key"><strong><code><a href="class.regexiterator.php#regexiterator.constants.use-key">RegexIterator::USE_KEY</a></code></strong></dt>
      <dd>
       <p class="para">
        Special flag: Match the entry key instead of the entry value.
       </p>
      </dd>
     

     
      <dt id="regexiterator.constants.invert-match"><strong><code><a href="class.regexiterator.php#regexiterator.constants.invert-match">RegexIterator::INVERT_MATCH</a></code></strong></dt>
      <dd>
       <p class="para">
        Inverts the return value of <span class="methodname"><a href="regexiterator.accept.php" class="methodname">RegexIterator::accept()</a></span>.
       </p>
      </dd>
     

    </dl>
   </div>
  </div>

  <div class="section" id="regexiterator.props">
   <h2 class="title">Eigenschaften</h2>
   <dl>
    
     <dt id="regexiterator.props.replacement">
      <var class="varname">replacement</var>
     </dt>
     <dd>
      <p class="para"/>
     </dd>
    
   </dl>
  </div>



 </div>

 













































<h2>Inhaltsverzeichnis</h2><ul class="chunklist chunklist_reference"><li><a href="regexiterator.accept.php">RegexIterator::accept</a> — Get accept status</li><li><a href="regexiterator.construct.php">RegexIterator::__construct</a> — Create a new RegexIterator</li><li><a href="regexiterator.getflags.php">RegexIterator::getFlags</a> — Get flags</li><li><a href="regexiterator.getmode.php">RegexIterator::getMode</a> — Returns operation mode</li><li><a href="regexiterator.getpregflags.php">RegexIterator::getPregFlags</a> — Returns the regular expression flags</li><li><a href="regexiterator.getregex.php">RegexIterator::getRegex</a> — Returns current regular expression</li><li><a href="regexiterator.setflags.php">RegexIterator::setFlags</a> — Sets the flags</li><li><a href="regexiterator.setmode.php">RegexIterator::setMode</a> — Sets the operation mode</li><li><a href="regexiterator.setpregflags.php">RegexIterator::setPregFlags</a> — Sets the regular expression flags</li></ul>
</div>
<?php manual_footer($setup); ?>