code: private String addStringEvidence(Dependency dependency, EvidenceType type, String contents,
              String blockVariable, String field, String fieldPattern, Confidence confidence) {
          String value = "";
  
          //capture array value between [ ]
          final Matcher arrayMatcher = Pattern.compile(
                  String.format("\\s*?%s\\.%s\\s*?=\\s*?\\[(.*?)\\]", blockVariable, fieldPattern), Pattern.CASE_INSENSITIVE).matcher(contents);
          if (arrayMatcher.find()) {
              final String arrayValue = arrayMatcher.group(1);
              value = arrayValue.replaceAll("['\"]", "").trim(); //strip quotes
          } else { //capture single value between quotes
              final Matcher matcher = Pattern.compile(
                      String.format("\\s*?%s\\.%s\\s*?=\\s*?(['\"])(.*?)\\1", blockVariable, fieldPattern), Pattern.CASE_INSENSITIVE).matcher(contents);
              if (matcher.find()) {
                  value = matcher.group(2);
              }
          }
          if (value.length() > 0) {
              dependency.addEvidence(type, GEMSPEC, field, value, confidence);
          }
  
          return value;
      }
docs: Adds the specified evidence to the given evidence collection.
  
  @param dependency the dependency being analyzed
  @param type the type of evidence to add
  @param contents the evidence contents
  @param blockVariable the variable
  @param field the field
  @param fieldPattern the field pattern
  @param confidence the confidence of the evidence
  @return the evidence string value added