added regexp to remove ~::~ from quotted strings.
shifting is not applied to '[', ']', '{','}' if they are inside a string.