home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- 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
- From: aaa@hpuerca.atl.hp.com (Simon Fowler)
- Subject: Re: Still problems with regcomp() and regexec()
- Sender: news@hpuerca.atl.hp.com ( News admin)
- Message-ID: <BxMBFK.10J@hpuerca.atl.hp.com>
- Date: Thu, 12 Nov 1992 19:28:30 GMT
- References: <1992Nov9.183202.17452@mercury.unt.edu> <BxICsC.I3F@fc.hp.com>
- Organization: Hewlett-Packard Company, Atlanta GA
- Lines: 19
-
- In article <BxICsC.I3F@fc.hp.com>, ec@fc.hp.com (Edgar_Circenis) writes:
- > (cpearce@nemesis.acs.unt.edu) wrote:
- >
- > #include <regex.h>
- >
- > regex_t r1, r2;
- >
- > void init()
- > {
- > regcomp (&r1, "^ *#keyword *$", REG_EXTENDED);
- > regcomp (&r2, "^ *#keyword +([^ ]+) *$", REG_EXTENDED);
-
- Try:
- regcomp (&r2, "^ *#keyword( +([^ ]+)) *$", REG_EXTENDED);
- ^ ^
- Note the extra '()'
-
- simon
-
-