python re.sub group: number after number
How can I replace foobar with foo123bar?
How can I replace foobar with foo123bar?
Is there any way to directly replace all groups using regex syntax?
In Python, the (?P<group_name>…) syntax allows one to refer to the matched string through its name: