Simple Search and Replace use of Regular Expression
- by nunos
So, I am adapting some code I found online to suit my needs. However, my set_pixel function has two more parameters. Since there are lots of calls to this function even doing a quick paste over would be very tedious. So, I thought this would be a good time for me to learn some simple regular expressions.
So, I have calls of this type:
set_pixel(arg1, arg2);
which I want to change to something like:
set_pixel(arg1, arg2, arg3, arg4);
Note: arg1 and and 2 should be preserved, whereas arg3 and arg4 are most of the time the same.
How can I achieve this?