[Israel.pm] regex questions

Offer Kaye offer.kaye at gmail.com
Mon Jul 19 06:38:49 PDT 2004


On Mon, 19 Jul 2004 16:23:26 +0300, yossi.itzkovich wrote:
> Hi,
> 
[...snip...]
> 
> (The best we came with was :  /\[DB((.*?)Nav|(.*?))\]/ ,  but then if we
> have "Nav", then we have ti use $2 else we have to use $1   Ichs...)
> 
> Yossi
> 

m/\[DB(.+?)(?:Nav)*\]/

Now only $1 will exist.

Hope this helps,
-- 
Offer Kaye



More information about the Perl mailing list