From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Re: [External] : Use the characters "+" and "-" in regular expressions Date: Thu, 20 May 2021 13:19:09 +0200 Message-ID: References: <20210519213207.GD4855@tuxteam.de> <20210520082613.GC1127@tuxteam.de> <20210520095603.GD1127@tuxteam.de> <20210520102244.GE1127@tuxteam.de> <20210520105035.GG1127@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="5079"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 20 13:20:58 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 1ljgja-00017X-D1 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 13:20:58 +0200 Original-Received: from localhost ([::1]:58494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljgjZ-0007X9-9M for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 07:20:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljgi0-0007Tf-Dh for help-gnu-emacs@gnu.org; Thu, 20 May 2021 07:19:20 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:55787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljghx-0001JU-62 for help-gnu-emacs@gnu.org; Thu, 20 May 2021 07:19:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621509549; bh=tXAxFybiqYIZ+2QT4JgYfJFFcqvV390A/jL02Lpd0Cg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=itaZh+hlEcBOmFweFMShsTjHVq6bPIF6aViwIoWVBSt92ZUTFqvrhJE5lk1+hZq9Y MK6u9FXNLGReDmlMIwTKro3as6r8zWpOWxqlicOIwa5jqOYIIUud4+/p63yI8Fjmvb YcUD0NYnF0Xw0Ao2gtDzLEg5HPSXgTkHebqugTVs= 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-bs16.server.lan [172.19.170.184]) (via HTTP); Thu, 20 May 2021 13:19:09 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20210520105035.GG1127@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:k2KfZNLhQVdQ0j+fA7lRx76bmfgKIcSpHxhlAKOzvEZ7SYOEb+qohibVq1M1tDvI3IWkG vBarAq/i/eNZg2dOFkzhIYezoovGn26RxilH6CSPFi8PeY7eBcF31OD8wz/a1Nj2oqDGMNeZLPfP v3L7Y+rXcpaMvtSQwNcz0/C3NZVaVvz1LCGKD+cLFdsyHxo6JUuNQHxEZv+geA/VwmrHb0Kz2Jt7 /pr6BO1QCepCTvgAfGN4UfOG90YDjK/pgHV95Mc6jmVTe75ZmWwLkP6vskdObpk1qoetQgvC1I80 wU= X-UI-Out-Filterresults: notjunk:1;V03:K0:eKQlfEcaCrE=:3Cee/M5Ipd1kqh/1NW5mkx JP356NyyokINh9vzSDW9xs9vvbgbWLp9ENA0RMrGTtoClnFlj8S+lOk3O5j3bjIxnh/U2/7k1 SwM44ygNm16AorbcCtC6oIVsw9WqU8fEzb0D6HooMeEyWLnjSJ5NYxsC5kQB5DvzkzI4amrdM RJw7CsNHgL+miW0OUZ5BpilSqSeJ6Cl1B5X0/nQ8f/IV0C1T3bakk0AuXsHSHzkkSYMbove/o RtUUbmOvig8jAbXFux0lh/nJg+UxUXJ00bnb4YuGmcMYJdlIzyDkZ5s/YEUxlrfg+lBhRMjhH bz2bCOh119byzY1cKaNzvcVQstKVc0pmp9C6XsfV6c4J6lNVma4qt3V6Zx3fzdsk2jfTiLtDS HlKuhEsGyQ0vS9V/qxBylqYJF/1wno72FxdFr1dwt6LJZ4h73ZfvX5gyILufeeptq5WlEMKDc sNHmxuFYv5d/dtmslUTRWLwv3F9Cp8SHWJllk8tVdK0gqrfZrMPjQijmXJxytsR7Ni0Fll0+d qXfaeNPoUtfU/XhBfDgm5aDy9rhXF2dFznj5gtuKS5gRQ63tBjAdASgNL6rl0pP4dXqNlZC9J cvgA4asxkHBdlWqPWmXk4ridAxofSrPJkjDgUu73xsCqs9hvZAoZhqNCzvOQ+4aLDkh2r/7K1 un+YR9gO2VfitgxVRtzSJNtAojjioXr1x7SsWSCu6WmQ/iD9RzUmEG/gOB6FxgQsbHaOg4c30 G7uMb5wlhD7aedV5xo0Nk5sncgtRonWJ54PT63UdoUoXLOoXMG6pJqnWUMMSGr5Z50FJERna Received-SPF: pass client-ip=212.227.15.15; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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:129960 Archived-At: This is a string of blanks, a string composed of whitespace of any length. " " > Sent: Thursday, May 20, 2021 at 10:50 PM > From: tomas@tuxteam.de > To: steve-humphreys@gmx.com > Cc: "help-gnu-emacs@gnu.org" > Subject: Re: [External] : Use the characters "+" and "-" in regular exp= ressions > > On Thu, May 20, 2021 at 12:37:17PM +0200, steve-humphreys@gmx.com wrote: > > [...] > > > Done some tests and got some strange results that thought would not ma= tch. Then things > > made more sense after your clarification because when I looked at some= of the strings, > > there was a comma in them. > > OK. Glad I could help. > > > Am seeing how to match strings of blank lines > > What is "a string of blank lines"? > > I know strings of characters. But a line is not a character. > > Do you mean "several blank lines next to each other"? I don't > think so. But what do you mean? > > > But " +" does not do the job. > > Again: you know by now that this will match "one or more spaces". Is > that for you a "string of blanks" (huh: where did you leave the > "line" from above?) or not? > > > I know why, but how can one match strings of blanks? > > To even have a chance to do that, you'll have to get hold of a more > or less precise idea of what "a string of blanks" is. This is work. > > Begin with: > > (string-match " +" "A summer full of butterflies") > =3D> 1 > > Bingo: the first run of one-or-more spaces is at the position 1 > (the first position in the string is 0, the "A"). So it's working > as it should. > > So what is /your/ idea of "a string of blank lines" or "a string > of blanks"? Only you can find out. > > If you feel you are stuck in that task, it sometimes help to collect > a couple of examples and counter-examples (they'll come in handy > when you try to test your attempts). > > Cheers > - t >