From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.help Subject: Re: regexp problems the evil \[ Date: Fri, 24 Mar 2017 00:38:18 +0100 Message-ID: References: <87shm3fygf.fsf@mat.ucm.es> <87o9wrfxta.fsf@mat.ucm.es> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1490312343 12503 195.159.176.226 (23 Mar 2017 23:39:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2017 23:39:03 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 24 00:39:00 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crCJf-00022n-5s for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Mar 2017 00:38:51 +0100 Original-Received: from localhost ([::1]:59206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crCJk-0008Qr-Cs for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Mar 2017 19:38:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crCJB-0008Qa-ET for help-gnu-emacs@gnu.org; Thu, 23 Mar 2017 19:38:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crCJA-0000ua-GA for help-gnu-emacs@gnu.org; Thu, 23 Mar 2017 19:38:21 -0400 Original-Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]:36626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crCJA-0000uV-A1 for help-gnu-emacs@gnu.org; Thu, 23 Mar 2017 19:38:20 -0400 Original-Received: by mail-pf0-x236.google.com with SMTP id o126so112001528pfb.3 for ; Thu, 23 Mar 2017 16:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=JyPT3E3SJ8VAeCzp07qgMWZj4Gnv4jIRTKbxBJpSkoM=; b=O5UL0A2XJZtMqjSlS1NiVXZThH4ZpWH2WjdMUlVuti026KHQip1x2j1XZf97FzfuUU BJy6/BIMFO5V1a+WsQV//D1ZkGoasg4GqI0QetLrI0XReOFO4ec1lu7mOpv3JcyYEnOF Z+OFzunpmZei6d8nmgEO+W2VfBS9mLtPmcn/5d47fdGcPqLzQWAydwvrjM34o4gR8aTt dKE61TT0QK9doNkUaLi0fFFsFp6ieVRPTCLhpaN4U+zPhebUpoPeMEthdEQQCs2MCV3w H9o+kIUWjLUZxUQgCQ+hk2fazxefDsjgZ5bGknvMXQynSSvJp2Kotp62qXgqzGqVgEbX k0fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=JyPT3E3SJ8VAeCzp07qgMWZj4Gnv4jIRTKbxBJpSkoM=; b=Mh0UtlYGNQBdfsuk4Gnr/STGEFvLzrRwBBc9B+CCl5jDzfpqZNCLLmqnoFDj54bBIi CzyOkRTZIX/fonGsiqTaqtFNneI++lBDdGnaMvxG6s98j/6ocuN2YDaJ9q0ylehRMgQS g3ZzYI+S49l8vdOjZrKIgtezmWCUlOpIjIsQkAxcG+mrzkAsypGTkzeK+dx8XypCdDeT 8Ib88ob0/T7ona7MkSYD+rElTkV/c5ZeCUpxWIyriJ18nLLs67H2de45elO5QH9Q/KdG NUC4+ncf6dthB/fD20rpBnslxF0hBn0AGFGVpHiA7DXGTdm7TWz3CoJCH/Hg2ddLIGNg lYZg== X-Gm-Message-State: AFeK/H1MS7Tf+4CSMSrHkz5Nz1dhY0yv7KAXiHrZIJOGprQm/02xkFLeY0S2NBdXmjo+k2mOB+oX/xmQXN9Dxg== X-Received: by 10.84.247.23 with SMTP id n23mr6730977pll.39.1490312298707; Thu, 23 Mar 2017 16:38:18 -0700 (PDT) Original-Received: by 10.100.182.11 with HTTP; Thu, 23 Mar 2017 16:38:18 -0700 (PDT) In-Reply-To: <87o9wrfxta.fsf@mat.ucm.es> X-Google-Sender-Auth: ggd9nqzafnxyscPW4hs5bNF2rg0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::236 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112645 Archived-At: On Thu, Mar 23, 2017 at 11:11 PM, Uwe Brauer wrote: > Wow six \ I gave up after five. Yes, it's ridiculous, I personally think emacs lisp regexes are unusable once escapes are involved, especially interactively. You can use rx instead of strings to make regexes from s-expressions. Strings elements are always assumed to match literally (rx will always escape whatever is needed to match the string literally). (query-replace-regexp (rx "\\[" (group (+ (not (any "}")))) "\\]") ...