title: Find All Word between < and > with Regex
body: <p>I want to find word between <code>&lt;</code> and <code>&gt;</code> from a String. </p>
  
  <p>For example:</p>
  
  <pre><code>String str=your mobile number is &lt;A&gt; and username is &lt;B&gt; thanks &lt;C&gt;;
  </code></pre>
  
  <p>I want to get <code>A</code>, <code>B</code>, <code>C</code> from the String. </p>
  
  <p>I have tried </p>
  
  <pre><code>import java.util.regex.*;
  
  public class Main
  {
    public static void main (String[] args)
    {
       String example = your mobile number is &lt;A&gt; and username is &lt;B&gt; thanks &lt;C&gt;;
       Matcher m = Pattern.compile("\\&lt;([^)]+)\\&gt;").matcher(example);
       while(m.find()) {
         System.out.println(m.group(1));    
       }
    }
  }
  </code></pre>
  
  <p>What's wrong with what I am doing?</p>