title: Regex parse string in java
body: <p>I am using Java. I need to parse the following line using regex :</p>
  
  <pre><code>&lt;actions&gt;::=&lt;action&gt;&lt;action&gt;|X|&lt;game&gt;|alpha
  </code></pre>
  
  <p>It should give me tokens <code>&lt;action&gt;</code>, <code>&lt;action&gt;</code>,<code>X</code> and <code>&lt;game&gt;</code></p>
  
  <p>What kind of regex will work?</p>
  
  <p>I was trying sth like: <code>"&lt;[a-zA-Z]&gt;"</code> but that doesn't take care of <code>X</code> or <code>alpha</code>.</p>