What are () (parentheses) are for in regex python [duplicate]

This isn’t specific to python, but in regex those denote a capture group.

Further information on how these are handled in re.split can be seen here

Leave a Comment