From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: [External] : Use the characters "+" and "-" in regular expressions Date: Thu, 20 May 2021 11:56:03 +0200 Message-ID: <20210520095603.GD1127@tuxteam.de> References: <20210519213207.GD4855@tuxteam.de> <20210520082613.GC1127@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gE7i1rD7pdK0Ng3j" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16208"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "help-gnu-emacs@gnu.org" To: steve-humphreys@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 20 11:56:59 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 1ljfQJ-00041j-Hh for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 11:56:59 +0200 Original-Received: from localhost ([::1]:55678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljfQI-0002iQ-2t for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 May 2021 05:56:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljfPY-0002g5-78 for help-gnu-emacs@gnu.org; Thu, 20 May 2021 05:56:12 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:37735) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1ljfPS-00026Z-AP for help-gnu-emacs@gnu.org; Thu, 20 May 2021 05:56:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=NhD+XpT/s+FCqcjQgXHE1L/s7DeSRm8SGuSRBm8n7tI=; b=P2EtA7vwUF2siTHvwW9V5n6Z9WAy6TFWmrvS+96jKWtUYeE1qiO53HKwDT1aCeNcGazzzOd+GDgv0i821G9Aw4/siHyR3K45oI+PRmjRzqaf/YOdu/ZJG/zfq+yGIA7/jXC/4+owVygTZtI4+OE57mmSC6yZM+xhj1LA9bJxlYMLt+Hae0A2XnU2NaJgZqP/gVk0oEEuoNoQtAMm9dTHDlyLBnfo4PeC5ThoIGGgjG+60B8wuXxJTlVqHnZXBCYZtqMc8q42yYJZlJIufdBZGpbu5fU00JcGoV59J39iNls8GgNgeqCjRRPx/IENOFaJsrdkZgPHpbg4Ss9nicRPiA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1ljfPP-0002SO-II; Thu, 20 May 2021 11:56:03 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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:129954 Archived-At: --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2021 at 11:42:58AM +0200, steve-humphreys@gmx.com wrote: > I have now used ";; [;+-.]+" to match some specific lines. >=20 > (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 ".". So this will match... (string-match "[+-.]" "Folks, let's go!") =3D> 5 =2E.. the comma! This is the whole discussion we've had just yesterday and today. I'm a bit confused: you seem to have ignored it totally. > How could I negate the regexp that I have defined? I don't even know what you mean by "negating a regexp". Cheers - t --gE7i1rD7pdK0Ng3j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmCmMjMACgkQBcgs9XrR2kZ2kACfSh/gCMfME5AYTAhhhLgrtjAW TCwAn2JcTbikT85d59KFFG1qT+8N12gX =l4Qd -----END PGP SIGNATURE----- --gE7i1rD7pdK0Ng3j--