use strict; use warnings; my $string = q{hereiam[[[one]]][[[two]]][[[three]]]wwhat}; my @strings = $string =~ m{\[+([^\]]*])\]+}g; print qq{@strings\n};
This produces
one two three
To make your posts easier to read you should surround code with <code> and </code> tags.
I hope this is of use.
Cheers,
JohnGG
In reply to Re: Perl regex
by johngg
in thread Perl regex
by rummlerm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |