The sample string to match is :
'Python is simple1 and Java is strong2 that means 1simple nice 2strong nice too'
My regular rule is:
'(.+)(\d).*(\2)(\1)'
The result I expected as follows:
('simple', '1', '1', 'simple')
('strong', '2', '2', 'strong')
But the present result is just the first one:
('simple', '1', '1', 'simple')
How to optimize the rule?