16 Replies Latest reply on Nov 26, 2008 12:36 PM by rtalton

    search function in filter function

    dpark1113 Level 1
      Hi,

      I have a filter function that does this,

      private function filter_handler(item:Object):Boolean
      {
      var isMatch2:Boolean = false;
      if (item.name.search('(Joe)') != -1)
      {
      isMatch2 = true;
      }
      return isMatch2;
      }
      When I do this, the search function ignores the parenthesis and ouputs 'Joe' and '(Joe)'. What I wanted to do is output only '(Joe)'. Does anyone know why the search function ignores parenthesis?

      Thanks.