I want to evaluate an a string math expression , so before i want to extract variables so i have to remove all special characters my code only can remove a special character like `a+b*c` and the result i get is `a=;b=;c=`, now if i write two successive special characters like `(a+b)*c` and `a++b` results will be `=;a=;b=;c=` and `a=;=;b=` always there is a sign `=;` added for no reasons so how to get rid of them because after that i will use mathematic functions so that will be a real problem for me please help me ! here is my code
Can you try printing the elements of the array using a loop and see what it prints.
posted 3 weeks ago
Yes i put a condition if variable[j]=="" and it works now , thank you all for help , i want to ask now another question if someone can answer me i'll be happy , i want to add a func_var which remove strings like 'cos' or 'sin' or 'tan' from string expression , did someone have an idea how to do that ?