Bug 143105
Summary: | grep fails to find a match when it should | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | David Alden <alden> |
Component: | grep | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED NOTABUG | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-12-17 12:18:23 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
David Alden
2004-12-16 15:42:55 UTC
It is correct that no match is found: ==> #include <error.h> #include <regex.h> #include <stdlib.h> #include <stdio.h> #include <sys/types.h> void r_error (int e, regex_t *rc) { char msg[200]; regerror (e, rc, msg, sizeof (msg)); msg[sizeof (msg) - 1] = '\0'; error (1, 0, "%s", msg); } int main () { int e; regex_t rc; if ((e = regcomp (&rc, "\\B-(t\\b|-timeout\\b=)", REG_EXTENDED)) != 0) r_error (e, &rc); else if ((e = regexec (&rc, "--timeout=500", 0, NULL, 0)) != 0) r_error (e, &rc); return 0; } <== $ make re cc re.c -o re $ ./re ./re: No match Thanks. :-) I guess I'll file this as a bug for the autofs folks. |