From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Determining existence of text following point Date: Tue, 18 May 2021 14:50:21 +0200 Message-ID: References: <87zgwsx5r3.fsf@ericabrahamsen.net> <20210518110743.GC11623@tuxteam.de> <20210518123541.GF11623@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9126"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, Jean Louis To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 15:01:08 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lizLQ-0002Aj-L2 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 15:01:08 +0200 Original-Received: from localhost ([::1]:44826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lizLP-00087z-J1 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 09:01:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lizBh-0000cI-0B for help-gnu-emacs@gnu.org; Tue, 18 May 2021 08:51:05 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:40481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lizBc-0000uk-A9 for help-gnu-emacs@gnu.org; Tue, 18 May 2021 08:51:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621342222; bh=ThSIJlFMC8S0+LF/kx+p0zLTqkw6ah8ednxJtECXQHE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Z01OQvnHJucXBJHhJeLm8yyYVBL5OAkCZoO1SVjGbNQl7zVZ1S8EF+Kgx9sSXbp/I vS/FEAWauN6w96uBhQb9CwAcGI19KCqhfm3H1miivoNNsxowfYDPeHZrP7HZJ+GRL0 JaJgXHox538OE/VSJcQwC7dPT9ABSTPUfGsfLYKM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs13.server.lan [172.19.170.181]) (via HTTP); Tue, 18 May 2021 14:50:21 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20210518123541.GF11623@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:vlqL78OkrQ/ehzW8r6c1oD2ITOuj1LVuteu0xRP7pZR4asc1asky/tQgW2rcEIcLCKKOU W8A+tGaAQyDIv6FfwNETNRKamxkQZZlmoMsieK99dFQrBRh++jdC+pa+PELIyYiibsAd15m/BIFM qrP5v7t488A8WP5PGn8tg6PvxxIpXSpOZ5Zua6XbArYmmhs2tb1dODxwUR4SvamJxtffmdC2yyRp sf4E8NOe6mzKneSZ4UvzRDPf/CmUCeN7ioGbfD1f9yYYNH9CHE7vrbRYgJiSs6U08HdNKsJuXJJU 3s= X-UI-Out-Filterresults: notjunk:1;V03:K0:PMxFKG8ipm4=:vR1lc18ZXY8ZosHH/Uvq4K +KyhWWbJ7aS1BChpiIhGYpTqQYikEbsl2vCshFNaSWwSXWzQ5U60v8eNFWtR0Im/wxxoYlDRj hbgwrC3eZtIECP16UTKlZD9qv0fUhZeR+d8Z+gh6rRZyPw+i3vFOIU/BUtdKEi+dRPU1WT7+g hcrCrOWskdQ+xk5HahX7V6qTKg9wneWtXGcBYQ14an5IZu1Iq8AVHvNll35awV6cInR6O7r8o qkE8f98yan1kHhsOAyJFh0hCWISIugXJrAnXjPRScJfXZtlyiGTeu5ms0hE3pwsg8kEB1AUHU h5VFAyGuAC7h3Sv3LUCQ1DrLk0n1RG6/7hXe71TWfLAHedDWfXPsRqDXZ7yJlmr3celOjS9uT rR83fuA4zJ4iWOGE4BUFpk9/1QlFLJsF1nvER5cR0mR4XR04hWSdXjLCMYxcTxNjI1uTxBIEs t9SfTYb++JKOaalSEpJoQTiwK8qJSoLTk/Em8/eav93DZthgNpA5dg+a3fqoXxVQgmLwTCv2C iub1aW1WgN/SOtN71woYAib5luznwLKAQbq1zoB7+6/W6vjUTQxQ//kRzSfcTt5pOvyTBtOmt nrx1xA9nrWeCi44jC6/UMkO+mtlpWIVskMd9e7bYNYX/blpWr1u+nX0VV1t3or5xXJtL9GUSe DtihDVb2YBrn2dr+x5NdY4jBAQkzl1JRmALBT6lY4JBVT7TfrZAQOPE0ipIUdNWtFXXAnYR94 x1+7IGOmsYInNS6PiPRnd0pBCfUz5rIxlOw2zceQ3aiFnb+EIIKKlqJ/rgqy4K44F1qV28VD Received-SPF: pass client-ip=212.227.17.21; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129882 Archived-At: > Sent: Wednesday, May 19, 2021 at 12:35 AM > From: tomas@tuxteam=2Ede > To: "Christopher Dimech" > Cc: "Jean Louis" , help-gnu-emacs@gnu=2Eorg > Subject: Re: Determining existence of text following point > > On Tue, May 18, 2021 at 02:23:25PM +0200, Christopher Dimech wrote: > > > Sent: Tuesday, May 18, 2021 at 11:56 PM > > > From: "Jean Louis" > > > To: "Christopher Dimech" > > > Cc: tomas@tuxteam=2Ede, help-gnu-emacs@gnu=2Eorg > > > Subject: Re: Determining existence of text following point > > > > > > * Christopher Dimech [2021-05-18 14:27]: > > > > > > (setq sa (string-match "[^[:blank:]]" " ")) > > >=20 > > > > I find the description different from what string-match actually > > > > returns=2E > > >=20 > > > The symbol ^ means "not following", and that regular expression mean= s > > > match non-blanks=2E > > >=20 > > > (string-match "[^[:blank:]]" " ") =E2=87=92 nil > > > (string-match "[[:blank:]]" " ") =E2=87=92 0 > >=20 > > You are correct=2E "^" means match everything but the following class= =2E > >=20 > > I am quite used on see "^" to mean "beginning of line"=2E So just rea= d > > it as I usually do=2E >=20 > This is outside the context of character classes, i=2Ee=2E outside [=2E= =2E=2E]=2E >=20 > > It is unfortunate that there exist so many different syntaxes for writ= ing > > regular expressions=2E >=20 > Yet all those syntaxes coincide in that one thing: "^" outside of > brackets means "anchor at the beginning" (of line, most of the time, > but it could be "of string" or similar), whereas inside of character > class brackets (but _only_ right after the opening bracket!) it > means complement=2E >=20 > This is an unfortunate quirk, but those notations are around since > the early 1970s, so that ship has sailed=2E Go and tell a phisicist > to use something else than the "uppercase L" for the Lagrangian=2E Richard Feynman used to come up with very strange notation, and we relied = on Freeman Dyson to make sense in a familiar mathematical notation=2E Einste= in had the same problem=2E =20 > The multitude of regular expression extensions and implementations > is an issue, yes, but a completely different one=2E >=20 > Cheers > - t >