I'm making a small function that should replace all characters that is not [a-f]|[A-F]. How can I make a function that replaces all charaters that isn't between the valid ones with ex. 0.?
ex:
string1 = "cfghhh";
want to replace it to be:
stiring1 = "cf0000";