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: Tue, 03 Dec 2024 00:09:01 +0100 Message-ID: <19389a262c8.27ee.f7cab59eedd5157033ccb454e473dbca@fastmail.fm> References: <87plm9g2rm.fsf@librehacker.com> <864j3lyaup.fsf@fastmail.fm> <86mshdwvgg.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: AquaMail/1.53.0 (build: 105300523) 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 Tue Dec 03 00:09:50 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 1tIFY5-0009BW-Et for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 00:09:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIFXQ-0002tC-J5; Mon, 02 Dec 2024 18:09:08 -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 1tIFXO-0002su-QU for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 18:09:06 -0500 Original-Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIFXM-0007Ic-VU for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 18:09:06 -0500 Original-Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id CB5901380206; Mon, 2 Dec 2024 18:09:03 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Mon, 02 Dec 2024 18:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding: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=1733180943; x=1733267343; bh=aL5g4a1yK5K7Cy1HJGkt+mJvAb27Rx0OffbyyXZGbUM=; b= oPQdOUlaqSajoLr4+tdTgrnkV7RaHCssB2+CEMht5Syq7zqwFire8vlXZ95JZShJ ODjADjJoutO1OeA3khrP6uiM4vCeODmzlu3+qsaXcKHcLgkC7mkQmHfZMeqSji7r l4n83maTmclC39OKcFrXyjVC5xxzlKQgfTae3sczCF08pQN7amREsEDC31KQenba hi/j18mvVGHg1A/HJStClpiZcbn0Qdc4oT4owaOa4JGtthPDzMPI5qbTk40uTs0x EQIWQ9zh2MdiUxMGSV5sEIcsOiXNIbFFFy3A3WDs9xV5ySYshy0X5BhU/btfFkRX ouF1CqjBdyf+Y6JAbJLWJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1733180943; x= 1733267343; bh=aL5g4a1yK5K7Cy1HJGkt+mJvAb27Rx0OffbyyXZGbUM=; b=R 6GzE+TWsFXKFjDwcI3kTInFxsYPTWdsu/BcyPnYxE0018Ml+HUUbWLkgcZShP6+A KMZLAFB0OQE9OzV+/WX5bQoihTfVDca+Qj7fQAy8RnJx8h+FO+byT2pqb8qsiu9Z s0kPBL2WcmOuF2HNhV62vPakbkxT4rdY5o5iK3T4Hz7teDWziTYJZ6gvxmHNu2OD rPDG2nXE+Sr7G0mmta0ySj2qivLJoDHFINxRndje3+XCurFGZd3M9jrfZDTDCjBF EXyFIPkEFXr0ISR48xJA84DZdKu2NB4iPtQrdNj7f3sfIlTWtpPiq4uxWPhaPoC4 CH7DubnODGHBFDATjJKAg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddriedtgddthecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevfffkjghffgfugggtgfesthekgidttdervden ucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhrvghmvghrshesfh grshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepkeejleeuveekhfeghfdvtdej feetieehfeevhedvudeuueegveeitddtvedthfdvnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhssehfrghsthhm rghilhdrfhhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtph htthhopegthhhrihhsthhophhhvghrsehlihgsrhgvhhgrtghkvghrrdgtohhmpdhrtghp thhtohephhgvlhhpqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Dec 2024 18:09:02 -0500 (EST) In-Reply-To: <86mshdwvgg.fsf@fastmail.fm> Received-SPF: pass client-ip=103.168.172.150; envelope-from=joostkremers@fastmail.fm; helo=fout-a7-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:148518 Archived-At: On 2 December 2024 23:51:49 Joost Kremers wrote: > 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. Or, try usimg \\| to match either a ?[ at the start ot the string or a ?[ preceded by a character other than a backslash... \\(?:^[[]\\|[^\\][[]\\) Whew... > -- > Joost Kremers > Life has its moments