in reply to
regexp problem using custom markup
Try
@colors = $new =~ m/(\[color=.*?\])/gi;
Adding the '?' makes the regex non-greedy. When it's greedy, it will merrily swallow everying until it reaches the last ']' in the target string.
Comment on
Re: Regexp
Download
Code
In Section
Seekers of Perl Wisdom