home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12848 < prev    next >
Encoding:
Text File  |  1992-11-12  |  969 b   |  31 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!sdd.hp.com!hpscit.sc.hp.com!scd.hp.com!hpscdm!hpuerca.atl.hp.com!aaa
  3. From: aaa@hpuerca.atl.hp.com (Simon Fowler)
  4. Subject: Re: Still problems with regcomp() and regexec()
  5. Sender: news@hpuerca.atl.hp.com ( News admin)
  6. Message-ID: <BxMBFK.10J@hpuerca.atl.hp.com>
  7. Date: Thu, 12 Nov 1992 19:28:30 GMT
  8. References: <1992Nov9.183202.17452@mercury.unt.edu> <BxICsC.I3F@fc.hp.com>
  9. Organization: Hewlett-Packard Company, Atlanta GA
  10. Lines: 19
  11.  
  12. In article <BxICsC.I3F@fc.hp.com>, ec@fc.hp.com (Edgar_Circenis) writes:
  13. >  (cpearce@nemesis.acs.unt.edu) wrote:
  14. > #include <regex.h>
  15. > regex_t r1, r2;
  16. > void init()
  17. > {
  18. >     regcomp (&r1, "^ *#keyword *$", REG_EXTENDED);
  19. >     regcomp (&r2, "^ *#keyword +([^ ]+) *$", REG_EXTENDED);
  20.  
  21. Try:
  22.       regcomp (&r2, "^ *#keyword( +([^ ]+)) *$", REG_EXTENDED);
  23.                                 ^         ^
  24. Note the extra '()'
  25.  
  26. simon
  27.  
  28.