I have a string
var str = "{{a}} {{b}} aaa";
I want to split the string with {{}}
. So, my expected result is
array = ["a", "b"]
Update:
As another case, given
var str1 = "{{a {{b}}}}",
str2 = "{{{a}}}";
The result should be
var arr1 = ["b"],
arr2 = ["a"];