Improved shorthand notation replacement