The function to extract tagged data can indeed be used.
my @links; my $extractor = gen_extract_tagged('[[', ']]', qr/(?:(?!\[\[).)*/); for (;;) { (my $link, $text) = $extractor->($text); last if not defined $link; push(@links, $link); }
Untested.
In reply to Re^3: Text::Balanced with nested / custom brackets
by ikegami
in thread Text::Balanced with nested / custom brackets
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |