dired-mark-if

dired-mark-if is a Lisp macro in `dired.el'.

(dired-mark-if PREDICATE MSG)

Mark all files for which PREDICATE evals to non-nil.
PREDICATE is evaluated on each line, with point at beginning of line.
MSG is a noun phrase for the type of files being marked.
It should end with a noun that can be pluralized by adding `s'.
Return value is the number of files marked, or nil if none were marked.