Ok so basically, I have a statement as such;
$scope.promotion = "((A|B)|(C|D)) & (E | ((F|G) & (H|I))) & (J | K)";
is it possible to separate this string based on the parentheses's? so that i get a return as such;
$scope.promo1 = "(A|B)";
$scope.promo2 = "(C|D)";
$scope.promo3 = "((A|B) | (C|D))";
something like this.
so after researching a bit, i would say this is one solution on how to break up the string based on a mathematical logic.
Hence, it array2 would return something like; ["A|B", "C|D"] and so on.