dired-string-replace-match

dired-string-replace-match is a compiled Lisp function in `dired.el'.

(dired-string-replace-match REGEXP STRING NEWTEXT &optional LITERAL GLOBAL)

Replace first match of REGEXP in STRING with NEWTEXT.
If it does not match, nil is returned instead of the new string.
Optional arg LITERAL means to take NEWTEXT literally.
Optional arg GLOBAL means to replace all matches.