RegexIterator::setPregFlags Sets the regular expression flags &reftitle.description; public voidRegexIterator::setPregFlags intpregFlags Sets the regular expression flags. &reftitle.parameters; pregFlags The regular expression flags. See RegexIterator::__construct for an overview of available flags. &reftitle.returnvalues; &return.void; &reftitle.examples; <function>RegexIterator::setPregFlags</function> example Creates a new RegexIterator that filters all entries with where the array key starts with 'test'. setPregFlags(PREG_OFFSET_CAPTURE); foreach ($regexIterator as $key => $value) { var_dump($value); } ?> ]]> &example.outputs.similar; array(2) { [0]=> string(4) "test" [1]=> int(0) } } array(1) { [0]=> array(2) { [0]=> string(4) "test" [1]=> int(0) } } ]]> &reftitle.seealso; RegexIterator::getPregFlags