Date: Sun, 4 Jul 1999 18:09:02 -0700 (PDT) From: Archie Cobbs <archie@whistle.com> To: howardjp@wam.umd.edu (Jamie Howard) Cc: freebsd-hackers@FreeBSD.org, tech-userlevel@netbsd.org, tech@openbsd.org Subject: Re: Repalcement for grep(1) Message-ID: <199907050109.SAA51971@bubba.whistle.com> In-Reply-To: <Pine.GSO.4.10.9907031513150.17705-100000@rac9.wam.umd.edu> from Jamie Howard at "Jul 3, 99 03:18:07 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Jamie Howard writes: > Now, I am having a problem though. I cannot figure out how to implement > -w and -x. For -x, I tried modifying the regular expression (foo) into > ^(foo)$ before compiling, but that did not work. I intended to do > something similar with -w. Anyway, I am probably missing the obvious, but > does anyone have any ideas regarding how I should implement -w and -x? From the re_format(7) man page: There are two special cases- of bracket expressions: the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at the beginning and end of a word respectively. A word is defined as a sequence of word characters which is neither preceded nor followed by word characters. A word character is an alnum character (as defined by ctype(3)) or an underscore. This is an extension, compatible with but not specified by POSIX 1003.2, and should be used with caution in software intended to be portable to other sys- tems. Perhaps this will help with -w? -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907050109.SAA51971>