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 15:55:30 +0200 Message-ID: References: <20210519213207.GD4855@tuxteam.de> <20210520082613.GC1127@tuxteam.de> <20210520095603.GD1127@tuxteam.de> <20210520102244.GE1127@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="39675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 20 15:57:23 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 1ljjAw-000A7w-Tr for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 15:57:22 +0200 Original-Received: from localhost ([::1]:44222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljjAv-0003vQ-UT for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 09:57:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljj9g-0003tY-UC for help-gnu-emacs@gnu.org; Thu, 20 May 2021 09:56:04 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:55857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljj9e-0005gK-Pb for help-gnu-emacs@gnu.org; Thu, 20 May 2021 09:56:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621518930; bh=9wUuOY2HjvB0z4oMafGAQQsmpP2ehfsdSmK56eXp9Kg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=SC5FoxvHqT/dnaW/kz+RqO/+Ll4qrMx8TsgsGGH/peJtEilbEHg1P5q1ifMY3uyAW 0bI1eAqD8r9SUSPCtOjfhxnezb7ysp/1oeO6ADXKHEkHuX5LEI1+rlZ+2UDbk1Kg4U MtpGuElret/QbVScL2rvm+bm578/mDKVrgdpIwdw= 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 15:55:30 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:d4WSlVzoRNEtHhaDlfSDfK/D7fu4RNfRXLSoK6jdGU4ELxAjjngo3/EFFpMTAAYe52zrs Nzw7bXrvqPV4fAi2eq6An8IydIS6miSO2ORWziZIzwHcNjfhK0fPhJIiQNTySIAnCGDx36ixD004 uSXfk9uSu+mBZwhKecM4z4lGhYCblZnExUI160KkMjQQJKaU2/lde26YrxJ7TW7emOgkoWKCjMCL U+eOszCU19FrCOprk2MmHlWam/gFdvIJyXHvTlVkmeluvTzIXSXJ1IaAa/meLNNyGdBe8qkpHjVp 5E= X-UI-Out-Filterresults: notjunk:1;V03:K0:jksvGqnl5gc=:xnUrJrs48cVibCNpCWPTwt DlX/lJIxjbrC/3U3yXSYbVMbuU6eRhjVSMeGGHuftftI+mVOY4aswe+FJbiAV+UKKkdqqDiDf StTz01opK9g7mlGdz81/CkQvzV+b8RYemSS54nrrq2wCHqY9yF1d8cdEr4KnauGk7KkjcpO+P VJK0c2ZDg86WYc55g1s1/+0sB1fhPtzgnYqjZAyLqnaIWkDMicnFscqMNfDsS5xL2wmOfIPA/ 2X0aOFDiwbaMe4joRLU000Ah4g2QAEqkK3am886rAooUHfpr45ioPLRdY6OqALU7ktwI5YiJX 3gNVJzHXEMPxWzpjs3ihK+zoN3EGGt+Z+KBKBPiMWgG+O6rl0YyeUIRNsumQWQ4fvfJLtjQcl eFZbK1nJ81IlEYp+kdv81LtnH1k6KfOkBE/cjDXhk0BppdY/cZXXx7DUbbZmD6RwVHoo6ojcl cRX7EZn7Qu1SECzLtf3PDiyJHseBv/npzJLA104QLN3d9bZ7z9xEhJknULxVdQjQ29I2Aotod PVn0DcBxwP/DFmkwGtc44cOqtQrp0RiBXODRci1aW6WhfAPKl9ETyL3UE42zffyzP6mnKvfmi Z9D6RJPLT8nVKwXIP5Xej9g1hXnLPa1/bw9qE69Cp/lBrGUR3lyJQuN4HphcPpggUL6sE8e8N C7Jxur6+cCKniMZ7GyOrCgTTKl2i5zcUwFSYGWb6m0co/nUN2PMCQ+YlLtmk/fYGnbvrmcwld kCMq6CiqS6POsQ5SRnBAmkgUD6llukrFRIILDEBwl4jhMo0b6szv5uQRiSVPaKqQB9rxHluN Received-SPF: pass client-ip=212.227.15.18; envelope-from=steve-humphreys@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:129975 Archived-At: > Sent: Friday, May 21, 2021 at 12:46 AM > From: "Jean Louis" > To: steve-humphreys@gmx=2Ecom > Cc: "help-gnu-emacs@gnu=2Eorg" > Subject: Re: [External] : Use the characters "+" and "-" in regular exp= ressions > > * steve-humphreys@gmx=2Ecom [2021-05-20 13:4= 1]: > > Am seeing how to match strings of blank lines > >=20 > > But " +" does not do the job=2E I know why, but how can one match str= ings of blanks? >=20 > [:blank:] is series of characters for that: >=20 > (string-match "[[:blank:]]" " ") =E2=87=92 0 Have done the following (string-match "^[:blank:]$" s) Because (string-match "[:blank:]" s) was matching sentences with space bet= ween words as well=2E > Match new lines as blanks: >=20 > (string-match "[[:blank:]]" "=20 >=20 > ") =E2=87=92 0 >=20 > There can be many various spaces, like EM SPACE: "=E2=80=83" >=20 > Thus this will not work on EM SPACE: >=20 > (string-match " +" "=E2=80=83") =E2=87=92 nil >=20 > But this will work: > (string-match "[[:blank:]]" "=E2=80=83") =E2=87=92 0 >=20 >=20 > --=20 > Jean >=20 > Take action in Free Software Foundation campaigns: > https://www=2Efsf=2Eorg/campaigns >=20 > Sign an open letter in support of Richard M=2E Stallman > https://stallmansupport=2Eorg/ > https://rms-support-letter=2Egithub=2Eio/ >=20 >=20 >