From: "Mattias Engdegård" <mattiase@acm.org>
To: Gregory Heytings <gregory@heytings.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 13:42:05 +0100 [thread overview]
Message-ID: <67089852-8265-4EE5-8234-F2F135A60949@acm.org> (raw)
In-Reply-To: <518ded72c3755a94a704@heytings.org>
19 nov. 2022 kl. 13.26 skrev Gregory Heytings <gregory@heytings.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.
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.)
next prev parent reply other threads:[~2022-11-19 12:42 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 [this message]
2022-11-19 12:49 ` Gregory Heytings
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=67089852-8265-4EE5-8234-F2F135A60949@acm.org \
--to=mattiase@acm.org \
--cc=emacs-devel@gnu.org \
--cc=gregory@heytings.org \
--cc=luangruo@yahoo.com \
/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).