Skip to content

RegularExpressionMatchIterator

Base classes

Name Children Inherits
QRegularExpressionMatchIterator
PySide6.QtCore
QRegularExpressionMatchIterator(self, /) -> None

⋔ Inheritance diagram

graph TD
  109479800["core.RegularExpressionMatchIterator"]
  2204398544["QtCore.QRegularExpressionMatchIterator"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  2204398544 --> 109479800
  37984305 --> 2204398544
  2751680898 --> 37984305

🛈 DocStrings

Bases: QRegularExpressionMatchIterator

Iterator on the results of a global match of a QRegularExpression.

Source code in prettyqt/core/regularexpressionmatchiterator.py
class RegularExpressionMatchIterator(core.QRegularExpressionMatchIterator):
    """Iterator on the results of a global match of a QRegularExpression."""

    def __repr__(self):
        return get_repr(self)

    def __iter__(self):
        return self

    def __next__(self):
        if self.hasNext():
            return core.RegularExpressionMatch(self.next())
        raise StopIteration

    def peek_next(self) -> core.RegularExpressionMatch:
        return core.RegularExpressionMatch(self.peekNext())

:fa-brands-github: Show source on GitHub