Function: evil-transform-vim-style-regexp
evil-transform-vim-style-regexp is a byte-compiled function defined in
evil-common.el.
Signature
(evil-transform-vim-style-regexp REGEXP)
Documentation
Transform vim-style backslash codes to Emacs regexp.
This includes the backslash codes \d, \D, \s, \S, \x, \X,
\o, \O, \a, \A, \l, \L, \u, \U and \w, \W. The new
codes \y and \Y can be used instead of the Emacs code \s and
\S which have a different meaning in Vim-style.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defun evil-transform-vim-style-regexp (regexp)
"Transform vim-style backslash codes to Emacs regexp.
This includes the backslash codes \\d, \\D, \\s, \\S, \\x, \\X,
\\o, \\O, \\a, \\A, \\l, \\L, \\u, \\U and \\w, \\W. The new
codes \\y and \\Y can be used instead of the Emacs code \\s and
\\S which have a different meaning in Vim-style."
(car
(car
(evil-transform-magic
regexp evil-regexp-magic #'regexp-quote
#'(lambda (char rest)
(let ((repl (assoc char evil-vim-regexp-replacements)))
(if repl
(list (cdr repl) rest)
(list (concat "\\" (char-to-string char)) rest))))))))