public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* change in pattern matching in pager /usr/bin/less
@ 2019-09-02  0:50 L A Walsh
  2019-09-02  7:25 ` Wayne Davison
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: L A Walsh @ 2019-09-02  0:50 UTC (permalink / raw)
  To: cygwin


For some reason, the behavior of less has changed recently in regards to how
it interprets characters like '\s' (whitespace).

Unlike previous versions which worked to use '\s' for whitespace and
use '+' for '1 or more', there seems to be nothing for \s
and to use '+' you would need <CHAR><CHAR>*.

This puts the cygwin 'less' at variance with the version I'm using on
linux.

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)

It could be the libraries they are linking into for RE's.
Though both appear to use the Gnu regex stuff.

Note, I'm not just saying cygwin less is different from linux less,
but also that the cygwin less is different from how it used to be.

Regularly when looking at a manpage, I use the search string:

^\s+topic\s

to find header words or cmds, etc.  I.e. it starts on a line by itself and
has multiple whitespace characters before it and 1 after.  I may need to
repeat the search a few times, as the word searched for can also be 1st on
a line.

Like to find 'typeset', I'd use '^\s+typeset\s'.

That no longer works in cygwin.

Idea?  Fix please?







--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-03  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02  0:50 change in pattern matching in pager /usr/bin/less L A Walsh
2019-09-02  7:25 ` Wayne Davison
2019-09-02 13:32 ` Steven Penny
2019-09-03  7:05 ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).