i = foo(a, 42, 1)
j = bar(b, c, 100, 2) # this is a comment (well, duh)
bazbar(etc, 3)
You want to edit the last parameter in each function call -- change it to 'hello'. I have two ways of approaching this: macros (interactive) or :norm (less interactive).1. Put your cursor on the first byte in the first line, type qq to record a macro of your change, q to finish. Select the rest of the lines in visual line mode and type :'<,'>norm @q to run the macro on each of the remaining lines.
2. Select the lines in visual line mode and type, for instance, :'<,'>norm %F,ws'hello' This is the "non-interactive" version of the above since the macro keystrokes are given directly to :normal. Pro: ability to undo keystrokes unlike when recording a macro. Con: cannot actually see the effect of the keystrokes (but with practice, this is not a problem).
(Note that colon in visual mode automatically inserts the :'<,'> so you only have to type :norm ...)
I find the declarative nature of regexes/:s to be too restrictive -- I much prefer the operational nature of macros/:normal, since that lets me make the change I want directly, without me having to phrase the change as a regular expression.
I could also use CTRL-A in normal mode to increment the last argument in each line: :'<,'>norm %b^A (where ^A is the literal, typed CTRL-V CTRL-A)
I feel like a wizard whenever I use :normal in a non-trivial manner.