From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: jan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#41006: 26.3; regular expressions documentation Date: Tue, 5 May 2020 11:05:25 +0100 Message-ID: References: <64E29F93-5A92-4F8D-9BA2-C6F14AEC2F64@acm.org> <824a1116-8e91-409f-95ff-69ef168a359d@default> <87k11s221z.fsf@stefankangas.se> Reply-To: jan Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="65087"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, Stefan Kangas , 41006@debbugs.gnu.org, drew.adams@oracle.com To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 05 12:06:11 2020 Return-path: Envelope-to: geb-bug-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 1jVuSn-000Goh-Mw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 May 2020 12:06:09 +0200 Original-Received: from localhost ([::1]:38030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVuSm-0002o8-LQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 May 2020 06:06:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVuSg-0002nb-4W for bug-gnu-emacs@gnu.org; Tue, 05 May 2020 06:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVuSf-0004At-RV for bug-gnu-emacs@gnu.org; Tue, 05 May 2020 06:06:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVuSf-0007OC-Mx for bug-gnu-emacs@gnu.org; Tue, 05 May 2020 06:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: jan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 May 2020 10:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41006 X-GNU-PR-Package: emacs Original-Received: via spool by 41006-submit@debbugs.gnu.org id=B41006.158867313328369 (code B ref 41006); Tue, 05 May 2020 10:06:01 +0000 Original-Received: (at 41006) by debbugs.gnu.org; 5 May 2020 10:05:33 +0000 Original-Received: from localhost ([127.0.0.1]:34754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVuSD-0007NV-9S for submit@debbugs.gnu.org; Tue, 05 May 2020 06:05:33 -0400 Original-Received: from mail-pl1-f169.google.com ([209.85.214.169]:39734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVuSB-0007NI-MZ for 41006@debbugs.gnu.org; Tue, 05 May 2020 06:05:32 -0400 Original-Received: by mail-pl1-f169.google.com with SMTP id s20so624975plp.6 for <41006@debbugs.gnu.org>; Tue, 05 May 2020 03:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=T1K2FuU2RYziDjAEMtgl+/ZxUShsQHP9o4uqJdfL1x4=; b=FBuwTo4zuGkTl96/jvFalJ00ehyTveC/FHkTVpf2q7oO5zy+iFSSfZQu6xTBvn36dX O05Ha5IQW7I6vMC7jy+lGseQG8b+AzVbAOkh3rAmnrG/oOragECh9J7PiCKaS05G+auu md8RSTZJfTg1misMcazU8caINHDvng6jg/TgIGrnxeSFvIPkxA4I2IzXPkJlDRWOFMIR lN0cz2fdXG3zxsfdsdyHBtcPsEF4s7Mp4PigxxXp3ohFdSZ3H12GyHTMsqSzwkksCam4 M/iQT/hETXi82Oavs3y9ud45kocybxIav6ih0193umwkeFQ6SMuvroXY9EgC9ZWr6RHZ i3Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=T1K2FuU2RYziDjAEMtgl+/ZxUShsQHP9o4uqJdfL1x4=; b=poo9EILoa1mlmthfZ1KOWMSlD8wghpGclJlLejUczIlEZAlY7I9jeSA8SlJjVRWijX 7TBVq7hETEVTGGzcWlrRdOL3PAeHfiaBbvIjKDEDNHsqFMf53O4JQyBjcSfjZ48leVmk NgRsdLrhOCpVdtkkEQKu2utY6MtaQjGmA17kDrmvT5OvfRw1kE8kzBfPe3j4dY8grXOq obioXhDGU4z18FHH/ObAlfGg6NGIL4BejxDHnImDVNQI1/ucTjkPp2iBa8ec4pV+5azl u4INjyGq69tmmPSVEz5SYQkZZl42U8s/pD2q64mpZxMIa7spE2+Jlb3vpScbRHb7OXJq W2lg== X-Gm-Message-State: AGi0PuY62Epp97gR1HTAWiCQcQd66UmBviRgZmXX09Bst1jZNnmZRp8s lqcaC+S05/p/cqnwpYKrvrvuumkOdEdw+U4ugUCGMA== X-Google-Smtp-Source: APiQypJceH0QhH/Pn/EbV/FrybYyDTDlQva3nGbKDR4KIOfzM+TnzBQE5Bo5VtwRWXw6HrH2OZ3YUUPtxZYseoS46es= X-Received: by 2002:a17:90a:718c:: with SMTP id i12mr2112993pjk.142.1588673125854; Tue, 05 May 2020 03:05:25 -0700 (PDT) Original-Received: by 2002:a17:90a:9a86:0:0:0:0 with HTTP; Tue, 5 May 2020 03:05:25 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179722 Archived-At: Hi all, I know this was addressed at Stephan but I'm getting increasingly puzzled by the difference between what other people are describing and what I'm seeing. In the other e-mail Mr Stallman said he could see this: * Regexp Special:: Special characters in regular expressions. * Char Classes:: Character classes used in regular expressions. * Regexp Backslash:: Backslash-sequences in regular expressions. My emacs (Windows, 26.3) shows * Regexp Search:: Search for match for a regexp. * Regexps:: Syntax of regular expressions. * Regexp Backslash:: Regular expression constructs starting with = =E2=80=98\=E2=80=99. * Regexp Example:: A complex regular expression explained. I started up my ubuntu machine and try to look in the manual to see if it was different from the windows, FYI I got "Info file emacs does not exist". OK... it finally twigged. I've just looked elsewhere. From the emacs menu: 'Search Documentation' submenu 'Look Up Subject In Elisp Manual' Enter: regexp RET Click 'Syntax Of Regexps' gets you to: "34.3.1 Syntax of Regular Expressions" which looks like what Mr Stallman has been describing and finally I can see what Eli has described: " =E2=80=98\{M,N\}=E2=80=99 is a more general postfix operator that specifies repetition with a minimum of M repeats and a maximum of N repeats. If M is omitted, the minimum is 0; if N is omitted, there is no maximum. For both forms, M and N, if specified, may be no larger than 2**15 - 1 . For example, =E2=80=98c[ad]\{1,2\}r=E2=80=99 matches the strings =E2= =80=98car=E2=80=99, =E2=80=98cdr=E2=80=99, =E2=80=98caar=E2=80=99, =E2=80=98cadr=E2=80=99, =E2=80=98cdar=E2=80=99= , and =E2=80=98cddr=E2=80=99, and nothing else. =E2=80=98\{0,1\}=E2=80=99 or =E2=80=98\{,1\}=E2=80=99 is equivalent to= =E2=80=98?=E2=80=99. =E2=80=98\{0,\}=E2=80=99 or =E2=80=98\{,\}=E2=80=99 is equivalent to = =E2=80=98*=E2=80=99. =E2=80=98\{1,\}=E2=80=99 is equivalent to =E2=80=98+=E2=80=99. " Now compare this to what's in the user manual (not the Elisp manual): " =E2=80=98\{N,M\}=E2=80=99 is a postfix operator specifying between N and M repetitions=E2=80=94t= hat is, the preceding regular expression must match at least N times, but no more than M times. If M is omitted, then there is no upper limit, but the preceding regular expression must match at least N times. =E2=80=98\{0,1\}=E2=80=99 is equivalent to =E2=80=98?=E2=80=99. =E2=80=98\{0,\}=E2=80=99 is equivalent to =E2=80=98*=E2=80=99. =E2=80=98\{1,\}=E2=80=99 is equivalent to =E2=80=98+=E2=80=99. " The user manual doesn't state that the {,x} syntax is valid where the Elisp manual does. thanks jan On 05/05/2020, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > So I go to the "Regular Expressions" node, looking mostly for how to > > use them. But I find nothing on that there. I only find a review of > > what looks like everything I already knew about regular expressions. > > What I see in master is this structure. > Is this different from what you saw? > Does this structure eliminate the problem you had? > > > @node Regular Expressions > @section Regular Expressions > @cindex regular expression > @cindex regexp > > ... > > @menu > * Syntax of Regexps:: Rules for writing regular expressions. > * Regexp Example:: Illustrates regular expression syntax. > @ifnottex > * Rx Notation:: An alternative, structured regexp notation. > @end ifnottex > * Regexp Functions:: Functions for operating on regular expression= s. > @end menu > > -- > Dr Richard Stallman > Chief GNUisance of the GNU Project (https://gnu.org) > Founder, Free Software Foundation (https://fsf.org) > Internet Hall-of-Famer (https://internethalloffame.org) > > >