title: grouping regex help
body: <p>I have this regex for defining identifiers:</p>
  
  <pre><code>[\w|@|#|_][\w|\.|\$|@|#|_]*
  </code></pre>
  
  <p>I need to allow as well groups of identifier that are grouped using [group] or "group" and for allowing "s inside the "group" you would need to write "" (two) and the same for the [group] you would do ]] for one ].</p>
  
  <p>the group might contain anything allowed in identifiers, spaces and any of these characters:
  tilde (~)
  hyphen (-)
  exclamation point (!)
  left brace ({)
  percent (%)
  right brace (})
  caret (^)
  apostrophe (')
  ampersand (&amp;)
  period (.)
  left parenthesis (()
  backslash ()
  right parenthesis ())
  accent grave (`)</p>
  
  <p>Examples :</p>
  
  <pre><code>"asda$@.asd ' a12876 ]] "" " =&gt; asda$@.asd ' a12876 ]] " 
  
  [asda$@.asd ' a12876 ]] "" ] =&gt; asda$@.asd ' a12876 ] "" 
  </code></pre>