Variable: grep-heading-regexp
grep-heading-regexp is a variable defined in grep.el.gz.
Value
"^\\(?:\\(?2:\\(?1:[^\n]+\\)\\)\\|\\(?2:\\(?1:.+?\\)[:=-]\\)\\)[[:digit:]]+[:=-]"
Documentation
Regexp used to create headings from grep output lines.
It should be anchored at beginning of line. The first capture group, if present, should match the heading associated to the line. The buffer range of the second capture, if present, is made invisible (presumably because displaying it would be redundant).
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/grep.el.gz
(defvar grep-heading-regexp
(rx bol
(or
(group-n 2
(group-n 1 (+ (not (any 0 ?\n))))
0)
(group-n 2
(group-n 1 (+? nonl))
(any ?: ?- ?=)))
(+ digit)
(any ?: ?- ?=))
"Regexp used to create headings from grep output lines.
It should be anchored at beginning of line. The first capture
group, if present, should match the heading associated to the
line. The buffer range of the second capture, if present, is
made invisible (presumably because displaying it would be
redundant).")