Find and replace regex in Intellij, but keep some of the matched regex? : <p>I changed an array to a list, so I want to change all instances of <code>myObject[index]</code> to <code>myObject.get(index)</code> where index is different integers. I can find these instances by doing</p>

<pre><code>`myObject\[.*\]`
</code></pre>

<p>However, I am not sure what I should put in the replace line - I don't know how to make it keep the <code>index</code> values.</p>
