How do I get the calculator to ignore unwanted text content?