title: Strip the last occurrence of numbers inside braces from a string
body: <p>I would like to know how to strip the last occurrence of ( ) and its content if only numbers/digits inside given a string.</p>
  
  <p>The below code strips all the ( ) in a string.</p>
  
  <pre><code> import regex
      s1 = "( 2,2,2) (GREATER) MINDS LIMITED ( 23 )"
      s2 = "( 2,2,2) (GREATER) MINDS LIMITED  ( closed )"
      res = regex.sub(r'\s*(\((?&gt;[^()]+|(?1))*\))$', '', s1)
      res = regex.sub(r'\s*(\((?&gt;[^()]+|(?1))*\))$', '', s2)
      print(res)
  </code></pre>
  
  <p>This will remove content inside string but i wanted to remove only digit or numbers inside ( ) which appears at last of string</p>
  
  <p>output: </p>
  
  <pre><code> s1 = "( 2,2,2) (GREATER) MINDS LIMITED ( 23 )"
   s2 = "( 2,2,2) (GREATER) MINDS LIMITED  ( closed )"
  </code></pre>