You can use this code:
var str = "[:en]tomato[:ml]തക്കാളി[:]";
str.split(/\[[:\w\s\d]*\]/).filter(function(data){
if(data != "")
return data;
});
//["tomato", "തക്കാളി"]
solved Javascript split does not work
You can use this code:
var str = "[:en]tomato[:ml]തക്കാളി[:]";
str.split(/\[[:\w\s\d]*\]/).filter(function(data){
if(data != "")
return data;
});
//["tomato", "തക്കാളി"]
solved Javascript split does not work