title: How can i list all name when it matches anywhere in the string?
body: <pre><code>for (int i = 0; i &lt; nodes.getLength(); i++) {
      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
      Element e = (Element) nodes.item(i);
      String nameMapString = XMLfunctions.getValue(e, "name");
      if(nameMapString.matches(".*+searchTextString1+.*")){
          map.put("id", XMLfunctions.getValue(e, "id"));
          map.put("name", "Name:" + XMLfunctions.getValue(e, "name"));
          map.put("Score", "Score: " + XMLfunctions.getValue(e, "score"));
          mylist.add(map);
      }
  
  
  }
  </code></pre>
  
  <p>I am writing an android program.
  searchTextString is user provided value from EditText.
  nameMapString holds value of name tag from xml file.
  Suppose it may contain Mark, Marry, Jack, JackMar etc.
  When i search Ma only, i want to display all which contain Ma (in this case Mark,Marry,JackMar). but above code display all name.
  Sorry for my bad english.</p>