title: Perl how to strip nested bbcode tags?
body: <p>Here is the code:</p>
  
  <pre><code>use perl5i::2;
  
  my $string = '[size 9]Some larger text. [i]Italic[/i] here.[/size]And [b]bold[/b] text.';
  $string =~ s/\[(.+).*?\](.+)\[\/\1\]/$2/gi;
  
  $string-&gt;say; 
  </code></pre>
  
  <p>The result is here:</p>
  
  <blockquote>
    <p>Some larger text. [i]Italic[/i] here.And bold text.</p>
  </blockquote>
  
  <p>Is there a single regex to strip the tags?</p>