home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!emory!swrinde!sdd.hp.com!hp-col!fc.hp.com!ec
- From: ec@fc.hp.com (Edgar_Circenis)
- Newsgroups: comp.sys.hp
- Subject: Re: Problems with regcomp() and regexec()
- Message-ID: <BxGM76.6Dp@fc.hp.com>
- Date: 9 Nov 92 17:35:30 GMT
- Article-I.D.: fc.BxGM76.6Dp
- References: <1992Nov9.165816.7162@mercury.unt.edu>
- Sender: news@fc.hp.com (news daemon)
- Organization: Hewlett-Packard Fort Collins Site
- Lines: 16
- X-Newsreader: TIN [version 1.1.4 PL6]
-
- cpearce@nemesis.acs.unt.edu wrote:
- > I'm currently trying to use the regular expression routines newly provided
- > in HPUX 8.0. As far as I can tell, I'm using the routines properly, but
- >
- > * I'm never able to get a full-line match and
- > * Subexpressions don't seem to be behaving properly.
- >
- > if (regexec (&r1, str, r1.re_nsub, rm, NULL))
- > printf ("Mathced.\n");
- > if (regexec (&r2, str, r2.re_nsub, rm, NULL))
- > printf (Matched. sp = %x; ep = %x\n", rm [1].sp, rm [2].ep);
-
- Well, for one thing, regexec() returns zero upon success. Your code expects
- non-zero.
-
- Edgar Circenis
-