From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Regular expressions and user-escaped characters Date: Mon, 02 Dec 2024 23:50:39 +0100 Message-ID: <86mshdwvgg.fsf@fastmail.fm> References: <87plm9g2rm.fsf@librehacker.com> <864j3lyaup.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9341"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.7; emacs 29.4 Cc: Help Gnu Emacs Mailing List To: Christopher Howard Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 23:51:19 2024 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 1tIFGA-0002Ej-JK for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 23:51:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIFFe-0001Vm-AW; Mon, 02 Dec 2024 17:50:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIFFd-0001Vb-NX for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 17:50:45 -0500 Original-Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIFFb-0001UL-NK for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 17:50:45 -0500 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id A90A51380267; Mon, 2 Dec 2024 17:50:42 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 02 Dec 2024 17:50:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1733179842; x=1733266242; bh=raifYoO0yR 6bxoMJExyn6T1L0DzBGnii1KT9U0MH43I=; b=rA1sI5MJ/LM74BgygJXGn/JXXm ak9Xibj2/D2K52d27+w0zsMoNnAh/5PAXC7z4Da2m1Cq4bjboxJxg3aCtd5E8/QR YDOTxHh1L8baaRKKI3iPB98nQ1e/sNj71HWIxmt438owd0eRwMqLOafeaGBqQNA8 V7BWFa7bmBYnVduGJOJFwQWfwdQMNgTBdBZI3o0KOSO6Nd3bRNMu3ZQSzBw3EZNz wLyD11gmIj1j8Iqud0BWk8j4mDZMuQn0C3tYokq1PQ5c+BHCpxny6FNBkJyV5ljs Yx+sX2RHceYFqasHvhSzZk5R9n+yByINiP2JcB6SDKqHTxghNIhgyKO3GD6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1733179842; x=1733266242; bh=raifYoO0yR6bxoMJExyn6T1L0DzBGnii1KT 9U0MH43I=; b=AdZhFPH/R+Fjge7upHDBXJ0LYU6M5NUkokC8PIlXI0fTEpYBQOg TQN3IVPWGUHN/OLIgitw8eutlhQB/+ihT04Ivs3Cer4NTaPHM91MrQD/9yijnQph qWD2hJSU7aTf/tlsAz0upfhmKUU8Z1+84BjGNs7dDwwk13GjQZAajbk/R92xk6AZ oqiGCBQmh5e8z8+FHS2yJTmQ5aWJ2/V5ldcGUwdLzre9wqYLPxBXWFnb0RfwKnxk 31fxLfSr1Nmze+/TGyIi0RxC1DxcrEDFPO7BkCsQeK534SZmUfm/aigDRwSbrkYL 7TioTRPxy+1VoLqnVELQwG/vU6Dn7FrltjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddriedtgddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecu hfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrg hsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpeefkeejgffftdfgffejudeukeet heduhfevtefhhfehiefhledtgffhgeekiedvheenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgr ihhlrdhfmhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohephhgvlhhpqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgpdhrtghpthhtoheptghh rhhishhtohhphhgvrheslhhisghrvghhrggtkhgvrhdrtghomh X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Dec 2024 17:50:41 -0500 (EST) In-Reply-To: <864j3lyaup.fsf@fastmail.fm> (Joost Kremers's message of "Mon, 02 Dec 2024 23:32:46 +0100") Received-SPF: pass client-ip=103.168.172.149; envelope-from=joostkremers@fastmail.fm; helo=fout-a6-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148517 Archived-At: On Mon, Dec 02 2024, Joost Kremers wrote: > You may get away with something like "[^\\][[]", though keep in mind that > that does not match a ?[ not preceded by a backslash, but rather a ?[ > preceded by a character that is not a backslash. Mind you, what I forgot to mention: this means that a ?[ at the start of a string won't be found. A possible solution to that might be to prepend some character to the string before matching. -- Joost Kremers Life has its moments