Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Mar 2012 20:41:35 -0800
From:      Carl Johnson <carlj@peak.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: libc regex word-boundary support fallen-off?
Message-ID:  <87wr6u9yio.fsf@oak.localnet>
In-Reply-To: <20120309000848.0e82a736@gumby.homeunix.com> (RW's message of "Fri, 9 Mar 2012 00:08:48 %2B0000")
References:  <20120309000848.0e82a736@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
RW <rwmaillists@googlemail.com> writes:

> I've noticed for some time that claws-mail and less (which I think use
> libc's regex(3)) don't support word boundaries in searches. I might be
> delusional, but I think I've used \b in the past in both of those
> applications in FreeBSD.  
>
> According to regex(3) it's an implementation POSIX.2, so the feature
> needn't be supported, but at the bottom of the page it says
> "word-boundary matching is a bit of a kludge", so presumably it has
> been.
>
> Does anyone know what's going on?
>
>
> I switched from i386 to amd64 last year so it might be something to do
> with that. I'm currently using 8.2p6.

The only way I have found to do it is [[:<:]] and [[:>:]].  That is very
awkward, so I't love to hear of a shorter way.  I found them in the
re_format(7) manpage.
-- 
Carl Johnson		carlj@peak.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87wr6u9yio.fsf>