I have a string
work 1 work 2 work 3 work 4 work 5
I want to obtain
work 1 work 21 work 321 work 4321 work 54321
I use this command but not work
(?<=work\s(\d)+.)(work)(\s\d+)
$2$3$1
The problem is that it does not record the information replaced after the first occurrence and could do to save the changes after each occurrence.
When I apply the command I get
work 1 work 21 work 32 work 43 work 54