Форум сайта python.su
Я тебе ссылку terabayt'а подравнял, так как для третьего информация полнее.
python.org. re
Вот инфа про вопросы
(?...)
This is an extension notation (a '?' following a '(' is not meaningful otherwise). The first character after the '?' determines what the meaning and further syntax of the construct is. Extensions usually do not create a new group; (?P<name>...) is the only exception to this rule. Following are the currently supported extensions.
(?:...)
A non-capturing version of regular parentheses. Matches whatever regular expression is inside the parentheses, but the substring matched by the group cannot be retrieved after performing a match or referenced later in the pattern.
>>> import re >>> >>> match = re.search(r'(..)(..)(..)', 'abcdef') >>> match.groups() ('ab', 'cd', 'ef') >>> >>> match = re.search(r'(..)(?:..)(..)', 'abcdef') >>> match.groups() ('ab', 'ef') >>>
Отредактировано py.user.next (Авг. 24, 2016 09:11:15)
Офлайн
Спасибо :-)
Офлайн