Fix regex for global var prefix $