PING  0.9
Statistical data handling and processing in production environment
list_remove

Remove one or more items from an unformatted list.

%let res=%list_remove(list, item, casense=no, sep=%quote( ));

Arguments

  • list : a list of blank separated strings;
  • item : (list of) item(s) to remove from the list;
  • casense : (option) boolean flag (yes/no) set to perform cases sensitive search/matching; default: casense=no, i.e. all (low-case or upper-case) occurrences of the pattern item will be removed;
  • sep : (option) character/string separator in input list; default: %quote( ), i.e. sep is blank.

Returns

res : output list where all occurences of the item(s) present in both item and list lists have been removed.

Examples

%let list=DE AT BE NL AT SE;
%let mylist=%list_remove(&list, AT);

returns: mylist=DE BE NL SE, while similarly:

%let list=0 0.1 1 2 3 3.5 4;
%let mylist=%list_remove(&list, 0.1 3 4);

returns: mylist=0 1 2 3 3.5.

Run macro %_example_list_remove for more examples.

See also

%list_count, %list_compare, %list_slice, %list_append.