Replace text, but keeping content in between
<p>I have the following</p>

<pre><code>\citep{lehrer1969, nonaka2000}, or \citep{nonaka2000}
</code></pre>

<p>and I would like to get a regex to wrap <code>\index{}</code> around the <code>\citep{..}</code></p>

<p>resulting in</p>

<p><code>\index{\citep{lehrer1969, nonaka2000}}</code> for example</p>

<p>what is the regex to do this safely please?</p>

<p>If it helps, this is in TexStudio</p>