lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] 'less': BRE instead of ERE?


From: Vadim Zeitlin
Subject: Re: [lmi] 'less': BRE instead of ERE?
Date: Thu, 18 Mar 2021 00:15:20 +0100

On Wed, 17 Mar 2021 22:30:13 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> Gnu 'sed' and 'grep' use BRE by default, and ERE with '-E'.
GC> But 'less' seems to use ERE only. Is there no way to force
GC> it to use BRE, which I use everywhere else?

 Sorry, I don't know of any and I don't think it exists.

GC> I could rebuild it with
GC>   configure --with-regex=some_bre_library

 I also highly doubt there any libraries implementing BRE only. Your only
bet would seem to be to patch less to use POSIX BREs explicitly.

GC> but I was hoping for something more straightforward.

 The most straightforward and, IMNSHO vastly better option, is to use EREs
with everything that supports them. I understand the force of habits, but a
habit of using BRE would be worth breaking.

 FWIW personally I think that the usefulness of the different kinds of
"match expressions" can be approximately summarized as

        PCRE >> ERE >>> BRE > UNIX shell wildcards >> DOS shell wildcards

 Regards,
VZ

Attachment: pgpbXVCdGQDzJ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]