title: Java Regex check if string contains XML tag
body: <p>I am trying to determine if a string contains at least one XML tag using the <code>String.match()</code> function. Due to the way the project is set up, I would prefer if I didn't have to use a <code>Pattern</code>.</p>
  
  <p>Currently I use this Regex:</p>
  
  <pre><code>&lt;[A-Za-z0-9]+&gt;
  </code></pre>
  
  <p>Which obviously only checks if the string has right and left arrow brackets that contains text. What I need is a way to check if the string just has a single XML tag with Regex, eg input like:</p>
  
  <pre><code>blah &lt;abc foo="bar"&gt;blah&lt;/abc&gt; blah
  blah &lt;abc foo="bar"/&gt;
  </code></pre>
  
  <p>but not input like:</p>
  
  <pre><code>blah &lt;abc&gt; blah
  blah &lt;abc &lt;/abc&gt; blah
  </code></pre>
  
  <p>Is that possible?</p>