I want to replace some words with regex.
For example:
var str ="hello world |bo hello world bo| hello world |co hello world co| hello world,hello world |jp hello world hello world jp| "
var n=str.replace("world","stackoverflow");
But the content inside |bo ... bo|, |co ... co|, |jp ... jp| should not be modified world to stackoverflow.
worldeverywhere but not when it is inside these delimiters. That said, maybe I did not understand it correctly. If that is the case, please clarify it.