[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Webglimpse Home]
Re: Glimpse and partial matching.
On Tue, 6 Jun 2000, Golda Velez wrote:
> You might try a regexp like
>
> glimpse -H . '(^| )ca'
>
> instead. Definitely using -w will not work, because of the way glimpse
> defines word searches - it would look for "ca" as a whole word first, then
> it would apply the entire regexp pattern to the matching files.
Thanks - I'll give that a try. I have a worry that it'll be dog slow, but
I'll just have to try it and find out.
> See the paragraph headed "Regular Expressions" in the glimpse man page
> at http://webglimpse.net/glimpsehelp.html#sect7 .
I must admit I've been less than impressed with the Regular Expression
documentation. Glimpse tells you to look at agreps docs for its regex
flavor. Agrep tells you it's "mostly like egrep" except that it doesn't
do "+". This doesn't turn out to be true at all. Egrep supports a lot of
stuff that agrep doesn't - like the word-boundary meta-characters that
would be so helpful in this situation.
It's pretty lame to write a grep-replacement with a half-written regex
component and then not document it. Perhaps Glimpse should be modified to
allow drop-in replacements for agrep (egrep, PCRE, etc).
-sam