Question about CL-PPCRE

"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]> Tue, 23 Jun 2026 20:47:32 +0200
Newsgroups gmane.lisp.lispworks.general,gmane.lisp.cl-pro
Message-ID <CAG0Nw2nqLx+qUFfS9n++kUWX3bY30uO42EAnr4g2L_PvV0qoQg@mail.gmail.com>
Hi

I am sure I missed something in the CL-PPCRE documentation, but here it is.

I am fooling around with a C tokenizer and I am running into the following
problem.

The string *esre* contains the "escape sequences" for C (and Perl, etc etc)

CL Prompt > *esre*
"(\\\\(['\\\"\\?\\\\abfnrtv]|[0-7]{1,3}|x[a-fA-F0-9]+))"

If I use CL-PPCRE:REPLACE-ALL I get the following (I tried to boil it down):

CL Prompt > *(regex-replace-all "\\$<ES>" "/$<ES>/" esre)*
"/(\\(['\\\"\\?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F0-9]+))/"
T

Apart from the bounding slashes, I would have expected the result of
CL-PPCRE:REPLACE-ALL not to return a shorter string.

What exactly (backslash escaping for sure) am I missing?

Thanks.

--
MA