Search Results
Examples ¶ Example #1 RegexIterator::accept () example This example shows that only items matching the regular expression are accepted.
Table of Contents RegexIterator::accept — Get accept status RegexIterator::__construct — Create a new RegexIterator RegexIterator::getFlags — Get flags
Simple usage example of `RegexIterator::accept ()`. The RegexIterator::accept function is used to determine the accept status of the current item being iterated over in a RegexIterator object. It applies a regular expression pattern to the item's string representation and returns true if the pattern successfully matches, otherwise returns false.
Table of Contents RegexIterator::accept — Get accept status RegexIterator::__construct — Create a new RegexIterator RegexIterator::getFlags — Get flags RegexIterator::getMode — Returns operation mode. RegexIterator::getPregFlags — Returns the regular expression flags. RegexIterator::getRegex — Returns current regular expression
RegexIterator::accept (PHP 5 >= 5.2.0, PHP 7, PHP 8) RegexIterator::accept — Get accept status
Table of Contents — Get accept status — Create a new RegexIterator — Get flags — Returns operation mode — Returns the regular expression flags — Returns current regular expression — Sets the flags — Sets the operation mode — Sets the regular expression flags
Matches (string)RegexIterator::current () (or RegexIterator::key () if the RegexIterator::USE_KEY flag is set) against the regular expression.
