delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=IMi/ | |
OWxB6u1VzG3rtZgX6DKTapcChdHNjACQLPYLLmkv4kzO8C9d3cgCizYRwLOmEcoD | |
ve8HpsyW0LkxTlHFhjF/rQG9u721bdflk3uu6a6tTGR/ffzGWyQuWLLe5NXSF480 | |
MuIthpG13AfkUWZGveUT8KXUJkeAvC37/6naptc= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=F6gAYz316x | |
SgQDzxGJNb+WXUyaM=; b=LAE5t/6XGlcDpzQtnt2sknvsq+uxvNBV/Lj42s/MW5 | |
/Tjag8AqGQzlKlK5hBu7ChmI3hnVc908HeHGuoMi7QJzc51fY96oG7IkGauFP5se | |
WwRwqiNIXSgBGDYBPa7SP/ZfwaeeXNX8GylYrA8ypucKs+8C7++Uf7M7XJudKnBp | |
c= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=expanding, Principal |
X-HELO: | mx1.redhat.com |
Subject: | Re: manpage searches "^\s+keyword\s" vs. ??? |
To: | cygwin AT cygwin DOT com |
References: | <5C4E5F0F DOT 2090403 AT tlinx DOT org> <1210066491 DOT 20190130214043 AT yandex DOT ru> |
From: | Eric Blake <eblake AT redhat DOT com> |
Openpgp: | preference=signencrypt |
Message-ID: | <c8f36794-db4a-8148-0547-eaad351c7795@redhat.com> |
Date: | Wed, 30 Jan 2019 13:09:21 -0600 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <1210066491.20190130214043@yandex.ru> |
X-IsSubscribed: | yes |
--Dv2TJVVB2yxAC0lbXsef0NjfjzitZYa4K Content-Type: multipart/mixed; boundary="16zvbKxp63xDMFHiZU0ucpzpnwx66nX10"; protected-headers="v1" From: Eric Blake <eblake AT redhat DOT com> To: cygwin AT cygwin DOT com Message-ID: <c8f36794-db4a-8148-0547-eaad351c7795 AT redhat DOT com> Subject: Re: manpage searches "^\s+keyword\s" vs. ??? References: <5C4E5F0F DOT 2090403 AT tlinx DOT org> <1210066491 DOT 20190130214043 AT yandex DOT ru> In-Reply-To: <1210066491 DOT 20190130214043 AT yandex DOT ru> --16zvbKxp63xDMFHiZU0ucpzpnwx66nX10 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 1/30/19 12:40 PM, Andrey Repin wrote: >=20 > I've been puzzled by this since=E2=80=A6 forever, it seems. > This is something in less, but all the `man less` says is "regular expres= sion > library provided by your system". \s is a non-standard regex extension - glibc provides it, Cygwin has not (at least, historically). POSIX provides [[:space:]] as a portable alternative (although not all libc have implemented all of POSIX yet), but is annoyingly long to type. Similarly, BSD regex (which is where Cygwin derives its regex from) supports the non-standard regex extension [[:<:]] as a word boundary, while glibc has the same feature but spelled \<. I also seem to recall a patch in the past to teach Cygwin to respect \< by expanding it to [[:<:]] before calling into the BSD-derived code (although I couldn't actually find one in a quick search); a similar patch to expand \s into [[:space:]] would be a reasonable idea. > I guess this is down to compilation options at this point. Not so much compilation options of man and less, but rather the code used in Cygwin itself for handling regex. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --16zvbKxp63xDMFHiZU0ucpzpnwx66nX10-- --Dv2TJVVB2yxAC0lbXsef0NjfjzitZYa4K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlxR9mEACgkQp6FrSiUn Q2pjJwf9Ghae+VFlz5fRVG3nK2TF/cUp/JMF1L1HUlfEonVatBasodh8nFRZ/QxF kfJ8ek6b3nGcuLeVdhPI+vty5c7ijy9+960kPFOp4myWplnXHsCA5XHo8lNk5iuw e9rOMEj6fQL9kRqacWRerVuCO5aO3N7TFXWM/ifTrh9DUumWENfZttyjv/TQM1+7 slFzbt94Wk/TYau6SpA42yDxiYlucMKBCcrQwOdj4G4tYtJgkiX8LvXi0IJzI+RJ 63Z33uRGlEYFm5DlDAm3skVNS0wuDKtYvdA7Aus5asi/pOcLBwLEZTKweZ+ydSRd y+crr51j2eWYTw2U0NXnBmQp1iuuHw== =S7++ -----END PGP SIGNATURE----- --Dv2TJVVB2yxAC0lbXsef0NjfjzitZYa4K--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |