Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!mcnc!uvaarpa!mmdf From: marc@ATHENA.MIT.EDU (Marc Horowitz) Newsgroups: comp.lang.perl Subject: Re: Perl-Users Digest #651 Message-ID: <1991Mar9.230553.22037@uvaarpa.Virginia.EDU> Date: 9 Mar 91 23:05:53 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: Marc Horowitz Organization: The Internet Lines: 23 |> From: tchrist@convex.COM (Tom Christiansen) |> |> From the keyboard of emv@ox.com (Ed Vielmetti): |> :Speaking of which, what's the limits on the number of parentheses that |> :a regular expression can have? I got an unpleasant message |> : |> :/^(scan)\s+((-(\w*))|)\s*\+(\w*)((s+((||>)(.*)))|)/: too many () in regexp at /u:1/emv/bin/smoke line 167, <> line 1. |> |> Nine. To accept more, Larry would have to change the code that |> recognizes \1 .. \9 and $1 .. .$9. |> |> --tom 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. Comments? Marc