code: public static String extractFieldName(final String fieldDefinition) {
      String[] fieldNameParts = FILED_NAME_PATTERN.split(fieldDefinition);
      if (fieldNameParts.length == 1)
        return fieldDefinition;
      if (fieldNameParts.length == 3 && "by".equalsIgnoreCase(fieldNameParts[1]))
        return fieldNameParts[0];
  
      throw new IllegalArgumentException("Illegal field name format, should be '<property> [by key|value]' but was '"
          + fieldDefinition + '\'');
    }
docs: Extract field name from '<property> [by key|value]' field format.
  
  @param fieldDefinition
  definition of field
  @return extracted property name