title: How to use Android REGEX with Pattern and Matcher Classes?
body: <p>I have the following code:</p>
  
  <pre><code>String example = "&lt;!--§FILES_SECTION§\n" +
                  "Example line one\n" +
                  "Example line two\n" +
                  "§FILES_SECTION§--&gt;";
  
          String myPattern = ".*?FILES_SECTION.*?\n(.*?)\n.*?FILES_SECTION.*?";
          Pattern p = Pattern.compile(myPattern);
          Matcher m = p.matcher(example);
  
          if ( m.matches() )
              Log.d("Matcher", "PATTERN MATCHES!");
          else
              Log.d("MATCHER", "PATTERN DOES NOT MATCH!");
  </code></pre>
  
  <p>Why does it always return "PATTERN DOES NOT MATCH?"</p>