## basic usage
 a1 = 1;
 a2 = 2;
 clearvars a1;
 assert(!ismember("a1", who));
 assert(ismember("a2", who));

## globs
 a1 = 1;
 a2 = 2;
 clearvars a*;
 assert(!ismember("a1", who));
 assert(!ismember("a2", who));

## regexp
 a1 = 1;
 a2 = 2;
 aa = 3;
 clearvars -regexp a[0-9];
 assert(!ismember("a1", who));
 assert(!ismember("a2", who));
 assert(ismember("aa", who));

## regexp
 a111 = 1;
 a222 = 2;
 a333 = 3;
 clearvars -regexp ^a\d{3}$ -except a333
 assert(!ismember("a111", who));
 assert(!ismember("a222", who));
 assert(ismember("a333", who));

## except
 a1 = 1;
 a2 = 2;
 clearvars a* -except a2;
 assert(!ismember("a1", who));
 assert(ismember("a2", who));

## except regexp
 a1 = 1;
 a2 = 2;
 aa = 3;
 clearvars a* -except -regexp a[0-9];
 assert(ismember("a1", who));
 assert(ismember("a2", who));
 assert(!ismember("aa", who));

## regexp except 
 a1 = 1;
 a2 = 2;
 aa = 3;
 clearvars -regexp a* -except a[0-9];
 assert(ismember("a1", who));
 assert(ismember("a2", who));
 assert(!ismember("aa", who));

## global
function f()
   assert(ismember("a3", who("global")));
   a1 = 1;
   a2 = 2;
   clearvars -global a*
   assert(ismember("a1", who));
   assert(ismember("a2", who));
endfunction

 global a3 = 4
 f();
 assert(!ismember("a3", who("global")));
