title: Java Searching String Contents for partial match
body: <p>I'm working on a project where I need to search a paragraph of text for a particular string. However, I don't need an exact match, more of a % match. </p>
  
  <p>For example, here is the paragraph of text I'm searching: </p>
  
  <pre><code>Fluticasone Propionate Nasal Spray, USP 50 mcg per spray is a 
  corticosteroid indicated for the management of the nasal symptoms of 
  perennial nonallergic rhinitis in adult and pediatric patients aged 4 years 
  and older."
  </code></pre>
  
  <p>And then I'm searching to see if any words in the following lines match the paragraph: </p>
  
  <pre><code>1)Unspecified acute lower respiratory infection
  2)Vasomotor rhinitis
  3)Allergic rhinitis due to pollen
  4)Other seasonal allergic rhinitis
  5)Allergic rhinitis due to food
  6)Allergic rhinitis due to animal (cat) (dog) hair and dander
  7)Other allergic rhinitis
  8)"Allergic rhinitis, unspecified"
  9)Chronic rhinitis
  10)Chronic nasopharyngitis
  </code></pre>
  
  <p>My initial approach to this was using a boolean and contains:</p>
  
  <pre><code>boolean found = med[x].toLowerCase().contains(condition[y].toLowerCase());
  </code></pre>
  
  <p>however, the results are negative for each loop through. </p>
  
  <p>The results I expect would be: </p>
  
  <pre><code>1) False
  2) True
  3) True
  4) True
  5) True
  6) True
  7) True
  8) True
  9) True
  10) False
  </code></pre>
  
  <p>Very new to Java and its methods. Basically if any word in A matches any word in B then flag it as true. How do I do that? </p>
  
  <p>Thanks!</p>