-' Tag candidate quantity/charges following symbols or ).
-SuperbReplace(ThisComponent, "([A-Z][a-z]?|[\])}])[0-9]*[-+−]", "&@g@", 0)
-
-' Disqualify + and - in compound words, etc.
-SuperbReplace(ThisComponent, "@g@[[({A-Za-z0-9<>]", "@G@&", 0)
-SuperbReplace(ThisComponent, "@G@@g@", "", 0)
+' Tag candidate charges following symbols or ), but not in compound words, etc.
+' Acceptable next character. (Has to be before end of line to avoid matching @g@ tag itself.)
+SuperbReplace(ThisComponent, "([A-Z][a-z]?|[\])}])[0-9]*[-+−][^[({A-Za-z0-9<>]", "&@G@", 0)
+' Retag in front.
+SuperbReplace(ThisComponent, ".@G@", "@g@&", 0)
+' End of line.
+SuperbReplace(ThisComponent, "([A-Z][a-z]?|[\])}])[0-9]*[-+−]$", "&@g@", 0)