...As for inc(compontX.Tag); That can be fixed by search and replace using regular expression searchessearch for: inc\((.+?)\);replace with $1 := $1 + 1;