From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: [External] : Regexp for matching (defun lines Date: Thu, 01 Aug 2024 02:24:48 +0000 Message-ID: References: <5kzhsBHCj8GW4rjzi0sutBSutYlMHmDBIV7PD1V_v0CGB-KH5pSJPw0jrwHErO5ivHjsPTAcmmaAHXNJH4u6VON3xL6q7Hdwnf2SNxOw_G8=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16337"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 01 04:25:41 2024 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 1sZLVc-00045h-7v for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 01 Aug 2024 04:25:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZLUx-0006y1-O1; Wed, 31 Jul 2024 22:24:59 -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 1sZLUv-0006xo-T9 for help-gnu-emacs@gnu.org; Wed, 31 Jul 2024 22:24:57 -0400 Original-Received: from mail-40132.protonmail.ch ([185.70.40.132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZLUt-0003Ei-W1 for help-gnu-emacs@gnu.org; Wed, 31 Jul 2024 22:24:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722479093; x=1722738293; bh=v9mixajbCcetudC1aA+tgaNZfJn/MRmuCcKFawABb00=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=dcnX0LydNiJxOijyQY48PEq9LH0Ew8ndXMw4boItvB5+acsR0puN8Zb6EBkAzgQFU CSWzD+CqEX9GfvRs3dovmc6FvuVouh9YqxwyAvSYTekFpXetyUw5Lj3hnVWzhL7xTk ETL2sTbYpSHbzs7r5AHjeR9wA+kCqFn6/ZA+Zpmh1YWGX+fBh/K+dHOr5q9rtXdabN /0be8fC8lzmu0q0AMA9FIbpqvkG7uaz/jMwQfbtcrLjKiuKtkjoY5OxauUdGLsKpJg 1Jp1djpgM4BVhmxJX3lIW6aYxfFmYDTxjmtUK5/2f0cz3fcLpnR18S41vAoVQkckMa g5x7/axcjfk7w== In-Reply-To: Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 4b80ee04c32db754ddc47b9f1850179cc001e908 Received-SPF: pass client-ip=185.70.40.132; envelope-from=heimeborgia@protonmail.com; helo=mail-40132.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147476 Archived-At: Sent with Proton Mail secure email. On Thursday, August 1st, 2024 at 2:08 PM, Drew Adams wrote: > > > > > (concat > > > > > "^\\s-(" > > > > > (regexp-opt...) > > > > > t) > > > > > "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)") > > > >=20 > > > > I see that you use "\\sw". What is the advantage verses "[[:alnum:]= - > > > > _]" > > >=20 > > > No special advantage. You can include any other > > > chars you want, so you can pick up, e.g., > > >=20 > > > (defun foo!@$%^&*+=3D{}/:42<>? () > > > (message "Hello")) > > >=20 > > > Perfectly legitimate, and none of those chars > > > even require escaping. > >=20 > > Meaning that \\sw is superior to [[:alnum:]-_], right ? >=20 >=20 > No. >=20 > \\sw means word-char syntax. > [[:alnum:]-_] means alphanumeric- or symbol-char syntax. \sw is equivalent to "[:word:]", that includes digits. And [:alnum:]=20 is alphabetic and numeric. What is the difference ?