Define an interactive function (aka command), which
inserts this string. Then put this function on a key binding.
(defun my-insert-regex ()
(insert (format "%S" markdown-link-to-org-regexp)))
(define-key global-map (kbd "C-c i") #'my-insert-regex)
M-: you then just have to press
C-c i to insert this string at the prompt.
Note, that your regex is eventualy wrong and needs more escape characters.
re-builder can help you construct this regex.
M-: promt normaly supports a history. You just need to type or paste it once, then you can retrieve former inputs with
C-r searches backwards in the history. (
C-r maybe has a different keybinding in Doom, Evil).