code: public static Map<String, String> getVariableMapByPrefix(
        final Collection<Variable> variables, final String prefix) {
      final Map<String, String> shortlistMap = new HashMap<>();
      if (variables != null && prefix != null) {
        for (final Variable var : getVariablesByRegex(variables,
            Reportal.REPORTAL_CONFIG_PREFIX_REGEX)) {
          shortlistMap
              .put(var.getTitle().replaceFirst(prefix, ""), var.getName());
        }
      }
      return shortlistMap;
    }
docs: Shortlist variables which match a given prefix. Returns empty map, if no
  eligible variable is found.
  
  @param variables variables to be processed
  @param prefix prefix to be matched
  @return a map with shortlisted variables and prefix removed