This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: change in pattern matching in pager /usr/bin/less


On Sun, 01 Sep 2019 17:50:17, L A Walsh wrote:
part of this is that the new cygwin less appears to use Obsolete REs
that don't support '+'.  That may be a compile flag.

I don't know why \s is not working, however, 'awk' used to be the definitive
Extended (modern) RE reference and does use \s for whitespace.

My  linux less is at version 458 (POSIX RegEx)
my cygwin less is at version 530 (POSIX RegEX)

I have same version as you:

   $ less --version
   less 530 (POSIX regular expressions)

"+" is defined with PCRE, but also under ERE, which is what is used by "awk" and
"grep -E". Its only BRE that doesnt define "+". Not sure why this isnt working
for you but my less uses ERE. Another syntax under ERE is "{1,}", but that wont
help you if your ERE is missing.

In regard to "\s", thats not defined by BRE or ERE, so you would need PCRE for
that. Workaround is to use "[[:blank:]]", "[[:space]]", or simply use the space
character. I havent seen many man pages using tabs. For example doing "man man"
and searching for "[[:cntrl:]]" returns nothing.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]