If I have a line that could be:
'Hello (Test1 test2) (Hello1 hello2) other_stuff'
I would like to split it into something like this:
split1='hello' split2='Test1, test2' split3='Hello1, hello2' split4='other_stuff'
and then I put it in one variable:
full_split=[split1, split2, split3, split4]
And also the unknown line will be, if they continue to add words to the end, it will continue to add the shared variable ( split5 , split6 )
I'm looking for a regex, but I don't like to import modules that are not part of python. If I have to.
source share