python - to extract a specific string
<p>I have a string like :  </p>

<pre><code>    string="(tag, index: develop-AB123-2s), (index: develop-CD123-2s)"
</code></pre>

<p>I want to extract only "develop-CD123-2s", i.e. the string that comes after "(index:" and not the one with tag. How do I do in python? Thanks!</p>

<pre><code>&gt;&gt;&gt; string.split("), (")[1].split(":")[1].split(")")[0].strip()
'develop-CD123-2s'
&gt;&gt;&gt; 
</code></pre>

<p>The first split separates each tuple, then split on : and take the second result</p>

python