gsub时间:2022-09-27 22:15:15gsub("([ab])", "\\1_\\1_", "abc and ABC")[1] "a_a_b_b_c a_a_nd ABC" 分析:在后边查找a或b,查找到对每个字母后边加_