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 12:37:17 +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="27924"; 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 12:42:10 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 1ljg82-00073e-45 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 12:42:10 +0200 Original-Received: from localhost ([::1]:32874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljg81-0002yg-3Z for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 06:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljg3T-0000iA-Dd for help-gnu-emacs@gnu.org; Thu, 20 May 2021 06:37:27 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:38951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljg3R-0001oc-7j for help-gnu-emacs@gnu.org; Thu, 20 May 2021 06:37:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621507037; bh=gJs/ATj1CnUC3Yx6Q4lqZ//lFpUJITICodxZuclnw/M=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=LMrTVUEk0hJG9O2uq4isLll1MwI40s09js3X/1JhAG682Q1BAPP9I9WulOawYMB5R tddcyKym8J4+KzRQo5A/M9w07OpKP6G6TtO/T5EW7YJJl//K81oQTdaNvdNItHD5r1 j26KIus8cVOCDeLMNb0hvweuesh9tt+iOcoIyrUg= 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 12:37:17 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20210520102244.GE1127@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:avlpnDHlk3LSnVziy5Al8GzDkRiXl3B+YV/VTV5piu/8UWb9UuvqUfWthf2nCtNsYHFwP rqZ9TjtSL5SirHb2qNnB/AWIAMeqG4nYXFY6EOADjsxt8QYMpt3NHQs7qkzYV/k9FUipCn3pGYgP 9hp4Ul8FhpNrHXdewyU0n+sTNqRjp7zBHxGwKvkzHnTNdchWoMgni+k2VmdsCgYtfWCeu17mDLtp VmZeSrT6sgoY+hbGiEOLj8jJqEvQUX5Z88f3Sqj0/6CmnDNaOrlVADxJdr8Lmz9zNKR6szHiXOk4 Sg= X-UI-Out-Filterresults: notjunk:1;V03:K0:Atkyry6EUdA=:NUiQNhpH5kZCp/6j9FSIQe sPOHIO+TrdQsuYFRlaKlhLW5Lg9++gB6ciQ5T0uEvD5fOW2nTMOdA1/wWnU2y1uasRzbw1ucN 43t6FRL6z6+1kOxKOdKhHa9pLsKx3Zu9SsY0ZbOgTbSeNUrcA5jdsM0u+32ntb7F/1kMt6Zn9 LNQXtmbFqE5uY2MGv1euVE1YJ7LuzccUNvAP/Q+U9xNEwy5vutt8m8xp3yXLgyLkuuJaXIzkn cdrX2xfDDWNHueYNH3+LYENWrt2Q9hnYByxw1L0rEC/8UNy1Zs7D0+nM29M9XqaV1Wo55ZjPz iRIJY6PY5bkhquruMB8b0SG5pDCus0Iv4KI8BlfInO39u5C94JIdQeyIHivzi6VFtu6ctrx9I 72ao430tT1nrVKOxCbK8gZ0yhoM1S2m1V+JSFo7nEtTVSvwqx1e/Roihs/RDgGmjLhEhUWcSy ix5OBuRXcjzYei2sSl2TEMYhbkt9vRIRRR/MH1tyNablniIu2/mGFqWdR3CuIQusq8l57nTmB //lQWEK2aJiFRCoAYtO/hDA86xR6NOfd3Q3glqHDPcRQS9Qi3lhcwCLE+d2Tn+J9BMiIxTDFb WcqFTQbcHIvLAFYuNMEEbMosSiiCrHAmWRlgOriUq11t9UZTm68SUUjsEJwUN8DFSYntDeZRS +4a8AxHQypD9Dtu1ylabbX6sdBkSZAz08X+EG9wq38aEryQnropOqIVqEj2WF+Rf07213hDNz yVNk42oCT9niCvnKg6eGFStTX+VMtRLOLR+q0GCEB/3IoSINIhHlQDVb+DWGm7wt2xtQ5oJ9 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:129957 Archived-At: > Sent: Thursday, May 20, 2021 at 10:22 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:11:49PM +0200, steve-humphreys@gmx.com wrote: > > > > > > > Sent: Thursday, May 20, 2021 at 9:56 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= expressions > > > > > > On Thu, May 20, 2021 at 11:42:58AM +0200, steve-humphreys@gmx.com wr= ote: > > > > I have now used ";; [;+-.]+" to match some specific lines. > > > > > > > > (string-match ";; [;+-.]+" s") > > > ^ NOOOO! > > > > > > This is a dash in the middle, indicating a range (i.e. "match all > > > characters in the range "+" to "."). In ASCII (and by extension, > > > in UTF-8), these are "+", ",", "-" and ".". > > > > I thought it was only about numeric and letter ranges only. > > No. Any characters can be the endpoints of a range. But this is > somewhat dangerous, since, strictly speaking, the results might > depend on the character encoding. Nowadays, with ubiquitous Unicode, > this is less of a problem. In the context of Emacs, which probably > always uses its internal set (a superset of Unicode), results are > probably always consistent. > > That doesn't mean they are always intuitive. Quick: is "d" in > the range "[(-{]"? > > Don't do that. Your reader will thank you. > > Again: please, play with it. Make yourself test cases. Done some tests and got some strange results that thought would not match.= Then things made more sense after your clarification because when I looked at some of = the strings, there was a comma in them. Am seeing how to match strings of blank lines But " +" does not do the job. I know why, but how can one match strings o= f blanks? > Cheers > - t >