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

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

Changing regexp to single \ for message printing


From: Heime
Subject: Changing regexp to single \ for message printing
Date: Sat, 13 Jul 2024 09:30:37 +0000

I would like to have a function that takes a regexp such as

"\\(\\s-*\\[\\-\\] \\)\\(.*\\)"

that removes the extra \ in \\ but also add the necessary \ characters
to get another string that when used in message will print the regexp 
string with the single \.

I have tried to do the conversion myself but cannot get things quite right
with "\\(\\s-*\\\[\\\-\\\] \\\)\\\(.*\\\)\" because it is giving me

"\(\s-*M-x \-\ \)\(.*\)"

Whereas I need to get

(message regexp-display-string)

\(\s-*\[\-\] \)\(.*\)




reply via email to

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