python regular expression replacing part of a matched string

i got an string that might look like this “myFunc(‘element’,’node’,’elementVersion’,’ext’,12,0,0)” i’m currently checking for validity using, which works fine myFunc\((.+?)\,(.+?)\,(.+?)\,(.+?)\,(.+?)\,(.+?)\,(.+?)\) now i’d like to replace whatever string is at the 3rd parameter.unfortunately i cant just use a stringreplace on whatever sub-string on the 3rd position since the same ‘sub-string’ could be anywhere else in that … Read more