I am trying to make a calculator (please dont ask why). I need to test if the last 2 letters of a text are something (for example if there are two - characters i will make it not possible to add more) but the last letters could be like 15th and 16th or 47th and 48th letter. Also, if there is a mathematical equation on a text, is it possible to count it?