|
RegexIterator::__constructCreate a new RegexIterator Description
public RegexIterator::__construct
( Iterator
$iterator
, string $regex
[, int $mode = self::MATCH
[, int $flags = 0
[, int $preg_flags = 0
]]] )Create a new RegexIterator which filters an Iterator using a regular expression. Parameters
Errors/Exceptions
Throws an InvalidArgumentException if the Examples
Example #1 RegexIterator::__construct example Creates a new RegexIterator that filters all strings that start with 'test'.
<?php The above example will output something similar to: test 1 test 123 See Also
|