Re: [MacPerl-AnyPerl] Pattern matching question

[email protected] (Ronald J Kimball) Tue, 18 Dec 2001 09:55:46 -0500
Newsgroups perl.macperl.anyperl
Message-ID <[email protected]>
On Tue, Dec 18, 2001 at 02:53:24PM +0000, Adam Witney wrote:
> 
> Basically I want to strip out the contents of the first [], but this seems
> to be matching from the outside in. Is there a way to make it look for the
> first ] after the [ ?

Use a negated character class.

m/\[(EC:[^\]]+)\]/

Ronald