title: Extract string between brackets
body: <p>I would like to extract characters between first opening and last closing brackets in a string like <code>match[input[name="firstname"]]</code> considering the characters to retrieve may also contain more brackets. In this case it would get <code>input[name="firstname"]</code> Also, the string may contain some special characters like <code>{ # / \ ^</code></p>