Oh, I see.
In that case.. 🤔
You could split on"("
That'll give you an array of everything that has starts with a ( - but it won't include it.
Then all you'll need to do, for each item in that array, is Steps 2 - 4, and consider that Step 1 will always be either 1 or 0 (I can't remember right now - I think 0?)