Regex Python text manipulation – CodeProject

Hi!

(((13*(a7))+((12*(a6))+((11*(a5))+((10*(a4))+((8*(a2))+(9*(a3)))))))*(1*(a1)))

Can you suggest me a regex logic to make all (a’integer’) to be a’integer’?

For the given line above my desired output is

(((13*a7)+((12*a6)+((11*a5)+((10*a4)+((8*a2)+(9*a3))))))*(1*a1))

What I have tried:

I tried to generate a pattern using some online regex simulators, but i have no experience in this and is difficult for me. Also please suggest me some simple notes to know more about regex.

Read more here: Source link