help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs: adding 1 to every number made of 2 digits inside a marked reg


From: Hongyi Zhao
Subject: Re: Emacs: adding 1 to every number made of 2 digits inside a marked region.
Date: Thu, 23 Sep 2021 08:56:17 +0800

On Thu, Sep 23, 2021 at 8:47 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > `M-:' the above code with your data in scratch gives me the
> > following message in minibuffer:
> >
> > [Trailing garbage following expression]
>
> It is interactive so just do M-x ...
>
> (re-search-forward "[[:digit:]]\\{2\\}" nil t)

Still no so clear what's your meaning. The function you defined above
is named as `digits-sum' with an alias `di'. I can't see how this code
has anything to do with the ones you posted previously.

> Stick to the replace and match stuff when doing this as
> otherwise it is easy to insert stuff and then get a hit on
> that and so on ...
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>

HZ



reply via email to

[Prev in Thread] Current Thread [Next in Thread]