build regex only
find_and_replace will build regex every time I call it.
It is too slow and lacks flexibility.
I hope there is something like build_regex(cmd: &str) -> Struct {re, repl}.
Edited by Aloxaf
find_and_replace will build regex every time I call it.
It is too slow and lacks flexibility.
I hope there is something like build_regex(cmd: &str) -> Struct {re, repl}.