refactor(cloudcmd) regExp -> switch