all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: uzibalqa <uzibalqa@proton.me>
To: tomas@tuxteam.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: [External] : At least one character at beginning and end of words
Date: Mon, 15 Aug 2022 10:26:36 +0000	[thread overview]
Message-ID: <0Be_26Fj5-BJqBUKrkmW4RrzDUv4WYFKpUFUeTJ0ncs6XRD5Sy3GmLpn8bDKVKhoQm7lrnYE32jIxVyv3FK4hKZEw1Kj79PMOOUk0cEyA2I=@proton.me> (raw)
In-Reply-To: <YvoWdNeIYYqdcg4X@tuxteam.de>

------- Original Message -------
On Monday, August 15th, 2022 at 9:48 AM, <tomas@tuxteam.de> 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 combine
> 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



      reply	other threads:[~2022-08-15 10:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14 21:08 At least one character at beginning and end of words uzibalqa via Users list for the GNU Emacs text editor
2022-08-14 23:43 ` [External] : " Drew Adams
2022-08-15  4:36   ` tomas
2022-08-15  9:25     ` uzibalqa
2022-08-15  9:48       ` tomas
2022-08-15 10:26         ` uzibalqa [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='0Be_26Fj5-BJqBUKrkmW4RrzDUv4WYFKpUFUeTJ0ncs6XRD5Sy3GmLpn8bDKVKhoQm7lrnYE32jIxVyv3FK4hKZEw1Kj79PMOOUk0cEyA2I=@proton.me' \
    --to=uzibalqa@proton.me \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tomas@tuxteam.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.