From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: grep: RE error in ^*** ADVICE-ON-FAILURE-: repetition-operator operand invalid Date: Sat, 19 Nov 2022 13:42:05 +0100 Message-ID: <67089852-8265-4EE5-8234-F2F135A60949@acm.org> References: <87fsef9pms.fsf.ref@yahoo.com> <87fsef9pms.fsf@yahoo.com> <518ded72c3aa09fcd1c1@heytings.org> <87bkp39mxk.fsf@yahoo.com> <877czr9msv.fsf@yahoo.com> <28B9B7EC-BC77-435B-BE80-F4B39F0BB4E7@acm.org> <518ded72c3755a94a704@heytings.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21728"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 19 13:43:00 2022 Return-path: Envelope-to: ged-emacs-devel@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 1owNBU-0005TA-66 for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Nov 2022 13:43:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owNAp-0003A7-OY; Sat, 19 Nov 2022 07:42:19 -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 1owNAl-00039Q-If for emacs-devel@gnu.org; Sat, 19 Nov 2022 07:42:18 -0500 Original-Received: from mail1458c50.megamailservers.eu ([91.136.14.58] helo=mail267c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owNAi-0002l4-Si for emacs-devel@gnu.org; Sat, 19 Nov 2022 07:42:15 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1668861727; bh=zgdy+wtYTEdwm7bQ2LPAjjWW4kJLm5eL95D2P+RnXPE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=VhJUoQ+Mx+p+Y3IBBD7wOHcO8NBs4MviQJRzkjzjLl3UwB/z8tn4oOXwhs8UdxN+9 458mFUcmYAtAnTMW51Fh/2/niw1h/nuarafO65vkKkect5JtPCTREMX0pFoHYGgbS5 EeWZjhb6/ZkNMQvRg/wry6dGD1D8qzu5ahy6YuLg= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se [188.150.171.209]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 2AJCg5FO095526; Sat, 19 Nov 2022 12:42:07 +0000 In-Reply-To: <518ded72c3755a94a704@heytings.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A782F1A.6378CF1F.0061, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.58; envelope-from=mattiase@acm.org; helo=mail267c50.megamailservers.eu X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300173 Archived-At: 19 nov. 2022 kl. 13.26 skrev Gregory Heytings : > I just checked, it was not incorrect. POSIX says that in BREs the '*' = is special, except wen used: >=20 > - in a bracket expression > - as the first character of an entire BRE (after an initial '^', if = any) > - as the first character of a subexpression (after an initial '^', if = any) That just means that the first of the three asterisks is literal. The = other two are special and indicate repetition of the literal asterisk. In other words: "^***" means "^\**", matching zero or more asterisks at = the beginning of a line. (And even if the three asterisks were interpreted literally, it would be = bad style.)