From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa Newsgroups: gmane.emacs.help Subject: Re: [External] : At least one character at beginning and end of words Date: Mon, 15 Aug 2022 10:26:36 +0000 Message-ID: <0Be_26Fj5-BJqBUKrkmW4RrzDUv4WYFKpUFUeTJ0ncs6XRD5Sy3GmLpn8bDKVKhoQm7lrnYE32jIxVyv3FK4hKZEw1Kj79PMOOUk0cEyA2I=@proton.me> References: Reply-To: uzibalqa 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="20391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 12:27:59 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 1oNXKA-00058m-NL for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 12:27:58 +0200 Original-Received: from localhost ([::1]:45862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNXK9-0001JP-Dk for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 06:27:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNXJ8-0001J6-0u for help-gnu-emacs@gnu.org; Mon, 15 Aug 2022 06:26:54 -0400 Original-Received: from mail-4318.protonmail.ch ([185.70.43.18]:60357) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNXJ4-0004jf-IG for help-gnu-emacs@gnu.org; Mon, 15 Aug 2022 06:26:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1660559207; x=1660818407; bh=tgG+uNshZ14Gnsrhqu2v3Y8O5y2oVpZu0o0nNt7ZVuY=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=Br/wm98yMLSHF5j86Ru40lR/D09e8LvD7l7cDbboKRe+cfKmUsXZRR66vpLKt9Jo0 lkTtdW1GF11gkVmsG68BGHOxxL+Nx2c8A+ZqEq32zElzyRcnzNHuip+LB48EiSC6CU KdzJk+iD3q1KIptMMlLlIUgNfcKoMu6g9iHFOuz8FKXzZTyRYMX3nh579zUiMKAw+b t0obHCHNn77gbVVMMsr5WfWHhKDm0qYw/cIQs1qzC+xhrNJjCtfeX7cgRt6bUM8/Tv zijxb+JMWBIW1tS6YlDO4he3Y9pt1FEl2a25ekATEDSBatHX0cHxkO+WFNod+Xoqp2 +/rse4dMOBjIw== In-Reply-To: Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.43.18; envelope-from=uzibalqa@proton.me; helo=mail-4318.protonmail.ch 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:138878 Archived-At: ------- Original Message ------- On Monday, August 15th, 2022 at 9:48 AM, wrote: > On Mon, Aug 15, 2022 at 09:25:50AM +0000, uzibalqa wrote: > > > ------ Original Message ------- > > On Monday, August 15th, 2022 at 4:36 AM, tomas@tuxteam.de wrote: > > > > > 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= on regexps. > > > > Although I have done > > > > (insert (replace-regexp-in-string > > "\\([:alpha:]+\\)ple\\([:alpha:]+\\)" "\\1p\\2" word)) > > > > 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 combin= e > things (e.g. alpha plus comma or dash: [[:alpha:],-]) Yes, it makes sense. > Please, look into the manual. It takes some effort, but it's worth it. > > Cheers > -- > t