Variable: consult--convert-regexp-table
consult--convert-regexp-table is a variable defined in consult.el.
Value
Large value
(("\\<" . "\\b")
("\\>" . "\\b")
("\\_<" . "\\b")
("\\_>" . "\\b")
("\\s-" . "[ \\n\\t\\r]")
("\\S-" . "[^ \\n\\t\\r]")
("\\sw" . "[a-zA-Z0-9]")
("\\Sw" . "[^a-zA-Z0-0]")
("\\s_" . "[a-zA-Z0-9_-]")
("\\S_" . "[^a-zA-Z0-0_-]")
("\\`" . "^")
("\\'" . "$")
("*" . "\\*")
("+" . "\\+")
("?" . "\\?")
("\\(*" . "(\\*")
("\\(+" . "(\\+")
("\\(?" . "(\\?")
("\\(?:*" . "(?:\\*")
("\\(?:+" . "(?:\\+")
("\\(?:?" . "(?:\\?")
("\\|*" . "|\\*")
("\\|+" . "|\\+")
("\\|?" . "|\\?")
("^*" . "^\\*")
("^+" . "^\\+")
("^?" . "^\\?")
("\\|" . "|")
("|" . "\\|")
("\\(" . "(")
("(" . "\\(")
("\\)" . ")")
(")" . "\\)")
("\\{" . "{")
("{" . "\\{")
("\\}" . "}")
("}" . "\\}"))
Documentation
Regexp conversion table.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defconst consult--convert-regexp-table
(append
;; For simplicity, treat word beginning/end as word boundaries,
;; since PCRE does not make this distinction. Usually the
;; context determines if \b is the beginning or the end.
'(("\\<" . "\\b") ("\\>" . "\\b")
("\\_<" . "\\b") ("\\_>" . "\\b")
("\\s-" . "[ \\n\\t\\r]") ("\\S-" . "[^ \\n\\t\\r]")
("\\sw" . "[a-zA-Z0-9]") ("\\Sw" . "[^a-zA-Z0-0]")
("\\s_" . "[a-zA-Z0-9_-]") ("\\S_" . "[^a-zA-Z0-0_-]"))
;; Treat \` and \' as beginning and end of line. This is more
;; widely supported and makes sense for line-based commands.
'(("\\`" . "^") ("\\'" . "$"))
;; Historical: Unescaped *, +, ? are supported at the beginning
(mapcan (lambda (x)
(mapcar (lambda (y)
(cons (concat x y)
(concat (string-remove-prefix "\\" x) "\\" y)))
'("*" "+" "?")))
'("" "\\(" "\\(?:" "\\|" "^"))
;; Different escaping
(mapcan (lambda (x) `(,x (,(cdr x) . ,(car x))))
'(("\\|" . "|")
("\\(" . "(") ("\\)" . ")")
("\\{" . "{") ("\\}" . "}"))))
"Regexp conversion table.")