Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!csccat!camdev!mmuegel From: mmuegel@camdev.comm.mot.com (Michael S. Muegel) Newsgroups: comp.lang.perl Subject: Re: Perl-Users Digest #651 Message-ID: <397@camdev.comm.mot.com?> Date: 10 Mar 91 21:41:00 GMT References: <1991Mar9.230553.22037@uvaarpa.Virginia.EDU> Organization: Cellular Infrastructure Group, Motorola, Inc., Fort Worth, Texas Lines: 33 In article <1991Mar9.230553.22037@uvaarpa.Virginia.EDU> Marc Horowitz writes: >Ok, that explains it, but it doesn't excuse it. Sometimes I want to >match an expression complex enough (like Ed's example) that I need >more than nine () to group everything. In this case, perl should >still work, and I would say that the regexp in an array context should >contain as many elements as paren pairs, but that $1 .. $9 should >contain the first nine () matches. Funny how all this sprung up right now... I just got done writing a routine that generates regular expressions to match (possibly) abbreviated keywords. I was not even aware of this problem so I never thought about it when writing this routine. This LIMIT will now break it with large keywords. Ho, hum... Like Marc said, since you can do something this: @Matches = ($String =~ /some_expr_with_()s/); and then get at the sub-expressions through @Matches I am surprised there is even a limit. Larry, how many free cellular phones would it take to get this changed :-). -Mike -- +-----------------------------------------------------------------------------+ | Mike Muegel | Internet: mmuegel@mot.com | | Software Tools Group | UUCP: uunet!motcid!muegel | | Fort Worth Research & Development Center | Voice: (817) 232-6129 | | Cellular Infrastructure Group | Fax: (817) 232-6081 | | Radio Telephone and Systems Group | Mail: 5555 North Beach St. | | Motorola, Inc. | Fort Worth, TX 76137 | +-----------------------------------------------------------------------------+