How to get the index of Parentheses inside Parentheses in a String using Java
<p>I am giving input as a String s1= (RT)PO(Q(IT)); and want output as RTPO(QIT) as a String. If there is a parenthesis as a first character I want to remove that parentheses and its closing parentheses. Also, if there are 2 continuous parenthesis then remove the inside one. If I get indexes of these parentheses then I can remove them.</p>

<p>Can somebody help me with that? I am not good with Regex. </p>