[PLUG] Emacs regex search-replace wild cards

Johnathan Mantey manteyjg at gmail.com
Sun Sep 27 16:47:55 UTC 2020


I always have to play with regex's in Emacs until I get the syntax correct.

I would try this one:
20[[:digit:]]\{2\}

I can never remember where I need backslashes for some of the items. Every
language has its own rules, making it that much more difficult to keep it
straight.

On Sun, Sep 27, 2020 at 8:35 AM Rich Shepard <rshepard at appl-ecosys.com>
wrote:

> I have 4-digit numbers beginning with 20 that I want to replace with a
> string in a file edited with emacs. Specifying the regex search using
> either
> 20?? or 20[0-9][0-9] fails to replace anything. My web search found nothing
> relevant.
>
> What have I missed?
>
> Rich
> _______________________________________________
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list