(defun replace-fun (match)
;(split-string "x-y" "-"); <- 有这句返回 "AB(abc|D)EF",无此句返回 "ABabcEF"
"abc")
(replace-regexp-in-string "(.+?)"
'replace-fun
"AB(C|D)EF" t)
(defun replace-fun (match)
(save-match-data
(split-string "x-y" "-"))
"abc")
1 个赞