manpage searches "^\s+keyword\s" vs. ???

Brian Inglis
Thu Jan 31 00:55:00 GMT 2019

On 2019-01-30 11:40, Andrey Repin wrote:
>> I've always used "^\s+keyword\s" as a way to search for some keyword
>> starting a section.
> Welcome to the club.
>> On linux it still works, but on cygin it doesn't like '\s' as symbol for
>> white space.
>> Any idea why there might be a difference?
>> I note an option that could do similar in less -- '&pattern' turns OFF
>> single special characters, I tried that on linux and it turned off the '\s'
>> matching space.  That's how about other way?
>> Well didn't know if there might be some other op to go the other way, but
>> didn't see anything. any ideas?
> I've been puzzled by this since… forever, it seems.
> This is something in less, but all the `man less` says is "regular expression
> library provided by your system".
> I guess this is down to compilation options at this point.

The full class [[:space:]] works as expected.
Probably config options picking the BSD POSIX ERE library without char class esc
shortcuts, rather than allowing Glib, ICU, or PCRE ERE library with char class
esc shortcuts.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list