DRegExp - extension of QRegExp providing group syntax (from Python)

Версия: (Qt 4.x)
Сайт: ссылка...
Лицензия: GPL

DRegExp extends QRegExp with python's group syntax (?P...) and accessible via QHash: (?P...) Similar to regular parentheses, but the substring matched by the group is accessible via the symbolic group name name. Group names must be valid Python identifiers, and each group name must be defined only once within a regular expression. A symbolic group is also a numbered group, just as if the group were not named. So the group named 'id' in the example above can also be referenced as the numbered group 1.

For example, if the pattern is (?P[a-zA-Z_]\w*), the group can be referenced by its name in arguments to methods of match objects, such as group('id').

Пример: нужно разобрать имя файла и получить часть значения:
Имя файла: "2007-2-5.tif"
патерн: "(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)"
результат: (год: 2007, месяц: 2, сутки: 5)
Этот класс предназначен для Qt 4.