anchor.diff:  }
   
   String incrementVersion(String old) {
  +    if (!VERSION_REGEX.hasMatch(old)) {
  +      throw new Exception("the version in the pubspec is not a valid version");
  +    }
  +    var match = VERSION_REGEX.firstMatch(old);
       List<String> split = old.split(".");
  -    int major = int.parse(split[0]);
  -    int minor = int.parse(split[1]);
  -    int bugfix = int.parse(split[2]);
  +    int major = int.parse(match[1]);
  +    int minor = int.parse(match[2]);
  +    int bugfix = int.parse(match[3]);
       if (bugfix == 9) {
           bugfix = 0;
           minor++;
  
positive.code:             var old = pubspec["version"];
  
              var next = null;
              
              if (ctx.arguments.rest.length != 1) {
                  next = incrementVersion(old);
              } else {
                  next = ctx.arguments.rest[0];
              }
  
negative.code: part of hop_runner;
  
  var VERSION_REGEX = new RegExp(r"^(\d+)\.(\d+)\.(\d+)$");
  
  Task createVersionTask() {
      return new Task((TaskContext ctx) {
  