all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.