You can avoid the extraneous capture by using non-capturing parens.
my( $start, $middle, $end ) = $string =~ m[^ (.*?) ( (?:AB)+ ) (.*?) $ +]xg
...but you know that:)
In reply to Re: Re: Regex help
by BrowserUk
in thread Regex help
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |