I have been using Javascript for quite sometime now but this problem really caught my attention

I created a program that splits players from a string into individual names.

For example
 "Sadio Mane (Liverpool), Diao Balde Keita (Monaco), Ismaila Sarr (Rennes)"

to 

```
my_array = [Sadio Mane (Liverpool),Diao Balde Keita(Monaco),Ismaila Sarr (Rennes)];

```

I created a basic function that splits the names and gives me an array from a database which goes like this

```
 var my_array = [];
        var club = [];
        var names = [];

        function splitData(data) {
            var spl = data.split(",");
            my_array.push(spl);

        }

```

but then this string came along 

"Fakhreddine Ben Youssef (Al Ittifaq, Saudi Arabia), Saber Khalifa (Club Africain), Wahbi Khazri (Rennes, France)"

When i try to split this type of string it output the following 

```
    my_array = [Fakhreddine Ben Youssef, (Al Ittifaq, Saudi Arabia), Saber Khalifa (Club Africain), Wahbi Khazri , (Rennes, France)];

//which outputs

my_array[0]='Fakhreddine Ben Youssef';
my_array[1]='(Al Ittifaq';
my_array[2]='Saudi Arabia)';
my_array[3]='Saber Khalifa (Club Africain)';
my_array[4]='Wahbi Khazri' ;
my_array[5]='(Rennes';
my_array[6]='France)';

```

I think the problem is quite visible, It is splitting the comma in the brackets as well, if it would have been just this string I would have done it manually but there are more than 30 strings in similar fashion.