in reply to Re^8: How to avoid an alphabet and integer next to it in a string?
in thread How to avoid an alphabet and integer next to it in a string?

Using your code, input as C6H9
------Please enter single letter elements in caps only------ Enter the molecular formula of the compound = C6H9Hg Molform before: [C6H9 ] Molform after: [C6] The molecular weight of the above compound is = 72.0642

Using your code, input as C6H9Hg

------Please enter single letter elements in caps only------ Enter the molecular formula of the compound = C6H9Hg Molform before: [C6H9Hg ] Molform after: [C6Hg] Molform after: [C6Hg] The molecular weight of the above compound is = 272.6542
Thanks a ton! Yes, it worked!