I am trying to split the data in a specific way.
Given a string value like this
var str = "[:en]tomato[:ml]തക്കാളി[:]";
I am aiming for the following output:
tomato,തക്കാളി.
I attempted to achieve this using the code snippet below:
var res = str.split("[:en]");
console.log("values",res)
However, the values are not splitting as expected.
The current output is:
[:en]tomato[:ml]തക്കാളി[:]