replace(String, RE, Replacement) -> case re:run(String, RE) of nomatch -> String; _ -> NewString = re:replace(String, RE, NewReplacement, [{return,list}]), replace(NewString, RE, Replacement) end.
这块代码有两个问题:
[小问题]在11,12行可以使用re:replace(String, RE, NewReplacement, [{return,list}, global])代替