docs: private void checkInstancesMatchRegex(@Nullable String regex) {
          if (regex != null) {
              Pattern pattern = Pattern.compile(regex);
              instances().forEach(resource -> {
                  String value = (String) resource.value();
                  Matcher matcher = pattern.matcher(value);
                  if (!matcher.matches()) {
                      throw TransactionException.regexFailure(this, value, regex);
                  }
              });
          }
      }