Q:

How to use make a cell segue after doing a UISearch and filtering

I have been creating and app with a TableView and a UISearch bar.  The cells are selectable but the problem is I have cells preforming segues if they are selected.  
Code for this:
 func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    if (indexPath.row == 0){
        self.performSegueWithIdentifier("First", sender: tableView)
    }

When the user completes a filted search those cells now have different text in it.  So the thing they tap is then presents the wrong view.  Is their a way to make the my if statement above be if the Row is equal to a specific Sting in my array.
My array: 
var menu = ["first", "Second", "Third","Fourth", "Fifth", "Sixth"]
When the user doesn't do a search they cell and the text match but once the user does a search the cells stay where they are same with the segue but the text that the cell has is different.
MAIN PROBLEM: The cells text is not equal to the right view that should be presented after the search and filter.  They are just segueing no matter what the cell text is.
If someone could provide me with new code or adjust the existing code that would be great.
Ask me with any questions or if you need and clarification. All of my code is in swift. Thanks for the help! 
New code:
  func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {

    filtered = menu.filter({ (text) -> Bool in
        let tmp: NSString = text
        let range = tmp.rangeOfString(searchText, options: NSStringCompareOptions.CaseInsensitiveSearch)
        return range.location != NSNotFound

        let menu = ["First", "Second", "Third","Fourth", "Fifth", "Sixth"]
        // when a search is done you check if your array contains the search result
        if menu.contains(searchBar.text!) {
            // you change the search to lowercase
            // so keep all your segue identifiers with lowercase strings
            let identifier = searchBar.text!.lowercaseString
            // perform the segue
            self.performSegueWithIdentifier(identifier, sender: tableView)

        }

A:

So you have your searchBar and when you make the search you will have the keyword from the search, then you could do like this:
// Your array
let menu = ["first", "Second", "Third","Fourth", "Fifth", "Sixth"]
// when a search is done you check if your array contains the search result
if menu.contains(searchBar.text) {
      // you change the search to lowercase
      // so keep all your segue identifiers with lowercase strings
      let identifier = searchBar.text.lowercaseString
      // perform the segue
      self.performSegueWithIdentifier(identifier, sender: tableView)
}

Update
If you want to segue on a row click do the following
 func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    let identifier = menu[indexPath.row]
    self.performSegueWithIdentifier(identifier, sender: tableView)

Update 2
func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
        let menu = ["first" , "Second", "Third","Fourth", "Fifth", "Sixth"]
        // when a search is done you check if your array contains the search result
        // if yes
        if menu.contains(searchText.text!) {
            // you change the saerchText to lowercase
            // so keep all your segue identifiers with lowercase strings
            let identifier = searchbar.text!.lowercaseString
            // perform the segue
            self.performSegueWithIdentifier("identifier", sender: tableView)
        }
    })

Final solution that solved OP´s question
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    let cell = tableView.cellForRowAtIndexPath(indexPath)

    let menu = ["first", "second", "third","fourth", "fifth", "sixth"]
    // when a search is done you check if your array contains the search result

    let identifier = cell?.textLabel?.text!.lowercaseString

    if menu.contains(identifier!) {
        // you change the search to lowercase
        // so keep all your segue identifiers with lowercase strings
        // perform the segue
        self.performSegueWithIdentifier(identifier!, sender: tableView)  
    }
}

