1. 25
    1. 1

      This neat feature is very reminiscent of the /e flag of Perl regexes:

      s/re/arbitrary perl expression/e
      

      It’s incredibly useful in some cases. I use it in my inc script, which increments numbers inside lines given on standard input.

      1. 2

        Hey thanks, limited perl experience here… you prompted me to check /e out and then ran into /ee (whoa!) https://perlmaven.com/regex-superpowers-execute-code-in-substitution

        ps. http://john.ankarstrom.se/desktop is wonderful. Lots of macOS reads for me.

    2. 1

      Where is [PCRE] coming from? My biggest problem with emacs regexes is getting the syntax right escaping a lot of chars.

      1. 1

        Had totally forgotten I had pcre-mode enabled, but it’s part of pcre2el. pcre-mode is marked experimental (advises a handful of functions). I’ve not yet run into issues, though I don’t typically need more than basic regexps. There are alternatives in there (ie. use pcre-query-replace-regexp) to avoid advices.

        1. 1

          ah thanks, will try that. Maybe I cry a bit less time I have to use emacs regexes ;0

    3. 1

      Check out the scratch buffer