unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Changing regexp to single \ for message printing
@ 2024-07-13  9:30 Heime
  2024-07-13 14:44 ` Heime
  2024-07-17  2:53 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 4+ messages in thread
From: Heime @ 2024-07-13  9:30 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

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-*\[\-\] \)\(.*\)




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-17  2:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-13  9:30 Changing regexp to single \ for message printing Heime
2024-07-13 14:44 ` Heime
2024-07-17  2:38   ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-07-17  2:53 ` Stefan Monnier via Users list for the GNU Emacs text editor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).