From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Barbier Newsgroups: gmane.emacs.help Subject: Re: Shy groups and * ...eh, what? Date: Sat, 22 Oct 2022 13:12:14 +0200 Message-ID: References: <87edv0mqns.fsf@web.de> <87k04s48cb.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38281"; mail-complaints-to="usenet@ciao.gmane.io" To: Michael Heerdegen , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 22 13:18:46 2022 Return-path: Envelope-to: geh-help-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 1omCWc-0009sD-Hn for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 22 Oct 2022 13:18:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omCLn-00063s-Gf; Sat, 22 Oct 2022 07:07:39 -0400 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 1omCLO-00060g-FB for help-gnu-emacs@gnu.org; Sat, 22 Oct 2022 07:07:13 -0400 Original-Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omCLM-0000Wj-U6 for help-gnu-emacs@gnu.org; Sat, 22 Oct 2022 07:07:10 -0400 Original-Received: from tosh-laptop (unknown [IPv6:2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp6-g21.free.fr (Postfix) with ESMTPS id C096A780368; Sat, 22 Oct 2022 13:07:02 +0200 (CEST) Original-Received: by tosh-laptop (sSMTP sendmail emulation); Sat, 22 Oct 2022 13:12:15 +0200 In-Reply-To: <87k04s48cb.fsf@web.de> Received-SPF: softfail client-ip=2a01:e0c:1:1599::15; envelope-from=brubar.cs@gmail.com; helo=smtp6-g21.free.fr X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MISSING_MID=0.497, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140286 Archived-At: Michael Heerdegen writes: > Hello again, > > thanks for answers so far. We may want to improve that aspect in the > docstring of `rx' - but note that the more important question was about > why "\\`\\(?:ab\\)*\\'" matches "a" - that looks like a bug to me. > Looks like a real bug to me too, when using shy groups: it should match the whole "ab" or nothing, like it does when using implicit or explicit groups. And if you request exactly one "a", "a" doesn't match anymore ... (string-match-p "\\`\\(?:a\\{1\\}b\\)*\\'" "a") => nil I'm getting the same results with emacs 27, emacs 28 and emacs 29. Shouldn't you use a more alarming title ? Bruno