I have a bunch of code with lines like these spread all over:

```
plt.savefig( 'fig1.png' )
...
plt.savefig( 'figblah.png' )

```

I want to change every line to be:

```
plt.savefig( 'fig1.png', dpi=300  )
...
plt.savefig( 'figblah.png', dpi=300 )

```

I am very unexperienced with regex and been trying for a while with no success. I browsed lots of questions here, but just won't work yet. So far, I can find the strings with: `(?=savefig).*`, but I'm stuck there. I fancy that the problem is somehow *get the found value* and append the ', dpi=300
 string, but don't know how to do that.

(I'm working in jupyter-notebook, if that makes a difference)