title: Application error: Can't do regex matching on object
body: <p>I parse XML and I have search bar.  When I try search, I get this error: </p>
  
  <blockquote>
    <p>Can't do regex matching on object <code>&lt;List: 0x888de20&gt;</code>.</p>
  </blockquote>
  
  <p>I think problem is here:</p>
  
  <pre><code>- (void) searchTableView 
  {
      [filteredList superclass];
      filteredList = nil;
  
      filteredList = [[NSMutableArray alloc] initWithArray:app.listArray];
      NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF like[c] %@",[NSString  stringWithFormat:@"%@*",search.text]];
      [filteredList filterUsingPredicate:predicate]; 
  }
  </code></pre>
  
  <p>I am a beginner in Xcode.</p>
  
  <p>Here is all my MasterViewController Class:</p>
  
  <pre><code>@implementation MasterViewController
  @synthesize app;
  @synthesize detailViewController = _detailViewController;
  @synthesize theList;
  @synthesize filteredList;
  @synthesize search;
  
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      app = [[UIApplication sharedApplication] delegate];
      filteredList = [[NSMutableArray alloc] initWithArray:app.listArray];
      [self.tableView reloadData];
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
  }
  -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      //return [app.listArray count];
      return [filteredList count];
  }
  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil)
      {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
          cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
      }
      theList = [app.listArray objectAtIndex:indexPath.row];
      cell.textLabel.text = theList.znacka;
      cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
      return cell;
  }
  - (void)viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  }
  
  - (void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
  }
  
  - (void)viewWillDisappear:(BOOL)animated
  {
      [super viewWillDisappear:animated];
  }
  
  - (void)viewDidDisappear:(BOOL)animated
  {
      [super viewDidDisappear:animated];
  }
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
  
      return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
  }
  
  - (void) searchTableView
  {
      [filteredList superclass];
      filteredList = nil;
  
      filteredList = [[NSMutableArray alloc] initWithArray:app.listArray];
      NSPredicate *predicate = [NSPredicate predicateWithFormat:@"count=%d",[NSString stringWithFormat:@"%@*",search.text]];
      [filteredList filterUsingPredicate:predicate];
  
  
  }
  
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      DetailViewController *detailView = [[DetailViewController alloc] init];
  
      theList = [app.listArray objectAtIndex:indexPath.row];
  
      detailView.theList = theList;
  
      [self.navigationController pushViewController:detailView animated:YES];
  }
  - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
  {
      [self searchTableView];
      [self.tableView reloadData];
  }
  - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
  {
      [self searchTableView];
      [search resignFirstResponder];
  }
  @end
  </code></pre>
  
  <p>I have searchbar in the MasterViewController.xib. There, I have my five items (theList.znacka) from XML and now I need search at these items.</p>