RegEx: difference between "(?:...) and normal parentheses
- by N0thing
>>> re.findall(r"(?:do|re|mi)+", "mimi")
['mimi']
>>> re.findall(r"(do|re|mi)+", "mimi")
['mi']
According to my understanding of the definitions, it should produce the same answer. The only difference between (...) and (?:...) should be whether or not we can use back-references later. Am I missing something?
(...)
…