implement client-side of test_exclude_pattern