/+(?=([^"\\]*(\\.|"([^"\\]*\\.)*[^"\\]*"))*[^"]*$)/g, "&&"
When working with regular expressions, I successfully used the above pattern to replace instances of '+' with '&&'. However, now I am wondering how to modify it to replace the string "and" with "&&". Any suggestions?
str = "Loop(this and that is "Help and enjoy")";
The desired output should be:
Loop(this && that is "Help and enjoy")