http://qs1969.pair.com?node_id=185332


in reply to regexp problem using custom markup

You are matching, but you are not capturing. You need the parens around the match.

@colors = $new =~ m/(\[color=.*\])/gi;

mkmcconn
update also, read Death to Dot Star!

Replies are listed 'Best First'.
Re: Re: Regexp
by Anonymous Monk on Jul 25, 2002 at 21:24 UTC
    If there are no parentheses, it returns a list of all the matched strings, as if there were parentheses around the whole pattern. -- perlop / Regexp Quote-Like Operators

    -Anomo

      Thank you Anomo - you are right. Without the /g operator it will return '1'; but, it will capture just fine using the operator: something that frankly I have never used or noticed.
      Thanks again.
      mkmcconn