i have this string equation:
400-IF(3>5,5,5)+34+IF(4>5,5,6)
i want to split it by string 'IF(3>5,5,5)', means 'IF()' syntax, so here i used two if syntax.
so re.split() should give list with length: 2 ['400-', '+34+']
I made re and used as below.
re.split('IF[\(][0-9,a-z,A-Z,\$]*[\>|\<|=|/|%|*|^]?(.*)+[\,][0-9,a-z,A-Z,\$]*[\,][0-9,a-z,A-Z,\$]+[\)]', '400-IF(3>5,5,5)+34+IF(4>5,5,6)
')
But it is not returning proper answer. What is the mistake in my re. I am new in re.
Can anyone modify this re in python?
['400-', '+34+'](which is not the IFs with stuff inside) what do you mean?