I am trying to parse a file and split the line in python. Currently i can parse the file and load it into a list.
I am trying to take each line and split it by the parenthesis,
'datediff(varchar(30),timestamp(3),timestamp(3))'
reverse(text)
checkcluster(int,int,int,int,int)
declaredown(int)
I am trying to extract the parameters in side the function as so:
['varchar(30),timestamp(3),timestamp(3)','text','int,int,int,int,int','int']
However the result i am getting is:
['varchar(30', 'text', 'int,int,int,int,int', 'int']
I believe its because of bracket in varchar. Is there a way to split it just by the first occurrence and last occurrence of parenthesis?