title: Finding exact string using line.contains
body: <p>Apologies if some of this information comes across as lacking knowledge, just started learning Java.</p>
  
  <p>In this working the user searches for both road and town. The problem being that when searching for something like 'Cabramatta' the result 'Cabramatta West' will also appear in the results.</p>
  
  <p>The format of the information being read is as follows:</p>
  
  <p>William Street^3^3503^Collins Street^Cabramatta West</p>
  
  <p>William Street^3^3503^Collins Street^Cabramatta</p>
  
  <pre><code> while(fileName.hasNext())
       {
          String line =fileName.nextLine();
          {
          if(line.contains(suburbInput) &amp;&amp; line.contains(roadInput))
             {
                String tramDetails[] = line.split("\\^");
                String crossStreet = tramDetails[0];
                String stopNumber = tramDetails[1];
                int stopNumberInt = Integer.parseInt(stopNumber);
                String trackerID = tramDetails[2];
                int trackerIDInt = Integer.parseInt(trackerID);
                String roadName = tramDetails[3];
                String suburbName = tramDetails[4];
  
  System.out.print("'Suburb': " + suburbName + " 'Road': " + roadName + " 'Cross Street': " + crossStreet + " 'Stop': " + stopNumberInt + " 'Tracker ID': " + trackerIDInt + "\n");
  </code></pre>
  
  <p>How do I go about getting it to just find results for 'Cabramatta' when it's searched but also find results for 'Cabramatta West' when that's searched?</p>