unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Po Lu <luangruo@yahoo.com>, emacs-devel@gnu.org
Subject: Re: grep: RE error in ^*** ADVICE-ON-FAILURE-: repetition-operator operand invalid
Date: Sat, 19 Nov 2022 12:49:05 +0000	[thread overview]
Message-ID: <518ded72c37a0afa121d@heytings.org> (raw)
In-Reply-To: <67089852-8265-4EE5-8234-F2F135A60949@acm.org>


>> I just checked, it was not incorrect.  POSIX says that in BREs the '*' 
>> is special, except wen used:
>>
>> - 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.
>

Hmmm, you're correct. '^**' would be correct (matching zero or more 
asterisks), but '^***' is not, because POSIX also says that "multiple 
adjacent duplication symbols produces undefined results".

>
> (And even if the three asterisks were interpreted literally, it would be 
> bad style.)
>

It's better if the expression is correctly matched by more grep's, indeed. 
Anyway, bug closed.



  reply	other threads:[~2022-11-19 12:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87fsef9pms.fsf.ref@yahoo.com>
2022-11-19 10:59 ` grep: RE error in ^*** ADVICE-ON-FAILURE-: repetition-operator operand invalid Po Lu
2022-11-19 11:24   ` Gregory Heytings
2022-11-19 11:35     ` Mattias Engdegård
2022-11-19 11:49       ` Gregory Heytings
2022-11-19 12:05         ` Eli Zaretskii
2022-11-19 11:57     ` Po Lu
2022-11-19 12:00       ` Po Lu
2022-11-19 12:14         ` Mattias Engdegård
2022-11-19 12:26           ` Gregory Heytings
2022-11-19 12:42             ` Mattias Engdegård
2022-11-19 12:49               ` Gregory Heytings [this message]
2022-11-19 11:45   ` Eli Zaretskii
2022-11-19 14:06   ` Gregory Heytings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=518ded72c37a0afa121d@heytings.org \
    --to=gregory@heytings.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).