title: Stripping outer brackets from a string
body: <p>I am having some trouble writing a regex expression that will strip outer brackets from a string (I want to ensure any brackets within single/double quotes are preserved):</p>
  
  <pre><code>((0)) becomes 0
  (0)   becomes 0
  ('(0845) 187 1262') becomes '(0845) 187 1262'
  </code></pre>
  
  <p>I have got two regexes to match the left and right hand outer brackets:</p>
  
  <pre><code>^[\(]*  -- matches out the left outer brackets
  [\)]*$  -- matches out the right outer brackets
  </code></pre>
  
  <p>Is it possible to combine both into a single regex?</p>