Re: Replacement for grep(1) (part 2)
On Wed, 7 Jul 1999, Jamie Howard wrote: The FreeBSD, NetBSD, and OpenBSD manpage for grep says this: Grep understands two different versions of regular expression syntax: ``basic'' and ``extended.'' In GNU grep, there is no difference in available functionality using either syntax. Is this inaccurate or am I reading it wrong? I think that you are reading it wrong. It means "If you have a task that can be performed in GNU grep using a regexp in one syntax, then the same task can also be performed in GNU grep using a regexp in the other syntax". It does not also mean "... and the regexps in the two syntaxes will be identical". For example, if your task is "find lines that contain the characters open-parenthesesXclose-parentheses" then you can use the basic RE '(X)' or the extended RE '\(X\)'. You can get the same functionality using either syntax, but the way you get that functionality will depend on which syntax you are using. --apb (Alan Barrett) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Replacement for grep(1) (part 2)
On Wed, 7 Jul 1999, Jamie Howard wrote: The FreeBSD, NetBSD, and OpenBSD manpage for grep says this: Grep understands two different versions of regular expression syntax: ``basic'' and ``extended.'' In GNU grep, there is no difference in available functionality using either syntax. Is this inaccurate or am I reading it wrong? I think that you are reading it wrong. It means If you have a task that can be performed in GNU grep using a regexp in one syntax, then the same task can also be performed in GNU grep using a regexp in the other syntax. It does not also mean ... and the regexps in the two syntaxes will be identical. For example, if your task is find lines that contain the characters open-parenthesesXclose-parentheses then you can use the basic RE '(X)' or the extended RE '\(X\)'. You can get the same functionality using either syntax, but the way you get that functionality will depend on which syntax you are using. --apb (Alan Barrett) To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message