topic description
because our requirement is a global matching replacement string, but the replacement string is randomly input by the customer, which may contain escape characters such as "()" and "/", so we choose not to use the regular expression
sources of topics and their own ideas
can be replaced globally with split and join, but there is no way to achieve case insensitivity
related codes
/ / Please paste the code text below (please do not replace the code with pictures)
function replace_string (s1mems2mems3) {
if(s2){
s1 = s1.split(s2).join(s3);;
}
return s1;
}
what result do you expect? What is the error message actually seen?
case-insensitive implementation