Switch all command detection to regex