code: private static String getFieldName(Class<?> aClass,String regex){
  		for (Field field : aClass.getDeclaredFields()) 
  			if(field.getName().matches(regex)) 
  				return field.getName();
  		
  		return null;
  	}
docs: This method returns the name of the field whose name matches with regex.
  @param aClass class to check
  @param regex regex used to find the field
  @return the field name if exists, null otherwise