I have some strings with equations in the following format ((a+b)/(c+(d*e))).
((a+b)/(c+(d*e)))
I also have a text file that contains the names of each variable, e.g.:
For string str, use the replaceAll() function:
str
replaceAll()
str = str.toUpperCase(); //Prevent substitutions of characters in the middle of a word str = str.replaceAll("A", "velocity"); str = str.replaceAll("B", "distance"); //etc.