home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7548 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  858 b 

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!news.u.washington.edu!news
  2. From: absinthe@viva.chem.washington.edu (Daniel Faken)
  3. Newsgroups: comp.lang.perl
  4. Subject: Matching sequences NOT containing certain subsequences
  5. Message-ID: <1992Dec19.123317.10830@u.washington.edu>
  6. Date: 19 Dec 92 12:33:17 GMT
  7. Article-I.D.: u.1992Dec19.123317.10830
  8. Sender: news@u.washington.edu (USENET News System)
  9. Reply-To: absinthe@u.washington.edu
  10. Organization: University of Washington
  11. Lines: 12
  12.  
  13. I want to match the outermost parentheses in things like
  14.   (foo) and (foo\)), but not (foo()).
  15. I tried something like
  16.   /([^\\]\)){0}/
  17.  but got the message:
  18.   Can't do {0} at OC line xx.  [perl 4.0.1.7/33]
  19.  
  20. How is this sort of thing normally done (within one match)?
  21. thanks,
  22. --
  23.       Daniel Faken          |    Name a poison,
  24. absinthe@u.washington.edu   |    pick your flavour.
  25.