remove command factory classes, use a class to check the regex match condition