title: swift search contents of local HTML files via search bar and display results in tableview
body: <p>I have a very simple iOS swift app (storyboards) that displays a tableView controller to show a list of items, let's say in this case a list of fruits (Bananas, Cherries, Strawberries, Grapes, Pears).</p>
  <p>Tapping on any table cell opens another viewController, loading a webView which displays a local HTML page (located in a directory within the app) of formatted content with respect to that item. So if you tape on &quot;Bananas&quot;, it will load a local HTML file with a ton of formatted content regarding Bananas.</p>
  <p>I am trying to add a search bar to the tableView controller to allow me to search the <em>contents</em> all of the HTML files within the app for a particular string, and returning a filtered tableView list including only those results that match the string appearing in the end HTML files.</p>
  <p>For example, the HTML pages for &quot;Cherries&quot; and &quot;Strawberries&quot; contain the word &quot;red,&quot; so if I search for &quot;red&quot; via the search bar, the tableView would filter and only show &quot;Cherries&quot; and &quot;Strawberries&quot; because only those pages have the search term in their respective HTML contents.</p>
  <p>Basically, I am trying to make a very simple search engine within the app.</p>
  <p>There are a ton of tutorials about how to filter a tableView based on search bar, but those only talk about filtering by the Label, not by the end content.</p>
  <p>Is something like this even possible? I don't know where to start.</p>
  <p>Trying to avoid databases or anything too complicated as it is a very simple app that just needs a basic content search feature.</p>