libc regex word-boundary support fallen-off?
Carl Johnson
carlj at peak.org
Fri Mar 9 04:41:38 UTC 2012
RW <rwmaillists at 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 at peak.org
More information about the freebsd-questions
mailing list