You could use something like this:
my $key = $1 if $test =~ /\[(.+?)]/;In reply to Re: Using Regex to extract variable-length substring
by Laurent_R
in thread Using Regex to extract variable-length substring
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |