title: Regular Expression : No match found
body: <p>I just started learning about regular expressions. I am trying to get the attribute values within "mytag" tags and used the following code, but it is giving me No match found exception.</p>
  
  <pre><code>import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  
  public class dummy {
  
      public static void testRegEx()
      {
      //  String pattern_termName = "(?i)\\[.*\\]()\\[.*\\]";
  
          Pattern patternTag;
          Matcher matcherTag;
  
          String mypattern= "\\[mytag attr1=&amp;quot;(.*?)&amp;quot; attr2=&amp;quot;(.*?)&amp;quot; attr3=&amp;quot;(.*?)&amp;quot;](.+?)\\[/mytag]";
  
          String term="[mytag attr1=\"20258044753052856\" attr2=\"A security \" attr3=\"cvvc\" ]TagTitle[/mytag]";
  
  
          patternTag = Pattern.compile(mypattern);
  
          matcherTag = patternTag.matcher(term);
  
          System.out.println(matcherTag.group(1)+"*********"+matcherTag.group(2)+"$$$$$$$$$$$$");
      }
  
      public static void main(String args[])
      {
          testRegEx();    
      }
  
  }
  </code></pre>
  
  <p>I have used <code>\"</code> in place of <code>"</code> but it still shows me same exception.</p>