Foundation is not firm, shaking series

str="\u001b[32mOk\u001b"
Copy the code

Replace with

Ok
Copy the code

Error writing

str.replace(/\u001b[32mOk\u001b[0m/g, "Ok");
Copy the code

Content of the error

str.replace(/\u001b\[32mOk\u001b\[0m/g, "Ok");
Copy the code