From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: [External] : At least one character at beginning and end of words Date: Mon, 15 Aug 2022 11:48:36 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZAfSJIXl3iRog7dU" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16839"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: uzibalqa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 11:49:17 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 1oNWih-00043X-Fz for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 11:49:15 +0200 Original-Received: from localhost ([::1]:53782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNWig-0003gX-Ef for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 05:49:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNWi9-0003gM-Vw for help-gnu-emacs@gnu.org; Mon, 15 Aug 2022 05:48:42 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:37028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNWi7-0006jE-U6 for help-gnu-emacs@gnu.org; Mon, 15 Aug 2022 05:48:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HF8mb8facx/bMlsWbLdLzdlB+dQekSGU2sx84bTnNWk=; b=meq0KehXiJQTybYmwZtpdmC9Nb +iC9/oDGlJ9XOknzz+abENVaC4kIvqwR/RDJPwc36hWOi8LntEKYLoEEqIZ2HplYZ05Kk2hf5Z3uq BV1hGyE4qMblvcWRMZN45Fln2x4O742bpqtJCeeWUHGYRmqkL5C+oI4w99ltoMYaqT/t7SCnmeREs V+cFhFTwftOkhFjZjRBCQe8YUUkQsOFJNHtSzfmb8zyDrE9VpCW14hEc1gaYzpVEnc1HANbNivaq+ meHnUiW20SCAqiTVB5MCLtvKk47Ll7yC7zgjdDBEy7VwHd2kFXc4dEjjcvRwDm/mfrrSRl0gzHLO2 r9lGWOOQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1oNWi4-00007z-U2; Mon, 15 Aug 2022 11:48:36 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.help:138877 Archived-At: --ZAfSJIXl3iRog7dU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 15, 2022 at 09:25:50AM +0000, uzibalqa wrote: > ------ Original Message ------- > On Monday, August 15th, 2022 at 4:36 AM, wrote: >=20 >=20 > > On Sun, Aug 14, 2022 at 11:43:10PM +0000, Drew Adams wrote: > > > > > > I want to match the sequence "at least one letter" then "ple" > > > > then "at least one letter". How would a regexp look like.? > > > > > > "[:alpha:]+ple[:alpha:]+" > > > > > > I think you should spend some time reading the Elisp manual section o= n regexps. >=20 > Although I have done >=20 > (insert (replace-regexp-in-string > "\\([:alpha:]+\\)ple\\([:alpha:]+\\)" "\\1p\\2" word)) >=20 > word is being left intact. It's all in the manual, which you consistently ignore. Please do have a look at it. The [: ... :] character classes only go into the character class brackets (i.e. [ ... ]). So you need two pairs of brackets, like so: [[:alpha:]]. Yes, it looks strange. But it starts making sense when you want to combine things (e.g. alpha plus comma or dash: [[:alpha:],-]) Please, look into the manual. It takes some effort, but it's worth it. Cheers --=20 t --ZAfSJIXl3iRog7dU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYvoWbwAKCRAFyCz1etHa Ro/nAJoDTGY+8kYd6Cb01uaB/Y9aJp+A+QCfWn6uiZSpEmBHJpKE+Xu9UwnedNI= =OTlT -----END PGP SIGNATURE----- --ZAfSJIXl3iRog7dU--