title: What does this regular expression mean?
body: <p>I'm looking at a regular expression in our source code, and I'm unsure if it's correct.</p>
  
  <pre><code>&lt;&lt;SWE.[^&lt;&lt;]*&gt;&gt;
  </code></pre>
  
  <p>Specifically, what does the <code>[^&lt;&lt;]</code> part do? I thought the brackets allowed you to supply a range. Does it exclude "&lt;&lt;" or just a single "&lt;" ?</p>
  
  <p>If this was a line of text being parsed: </p>
  
  <pre><code>&lt;&lt;SWE.SomeText&gt;&gt;&lt;&lt;SWE.SomeMoreText&gt;&gt;
  </code></pre>
  
  <p>I think the author's intent is to have two matches instead of one.</p>
  
  <pre><code>match[0] = &lt;&lt;SWE.SomeText&gt;&gt;
  and
  match[1] = &lt;&lt;SWE.SomeMoreText&gt;&gt;
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>match[0] = &lt;&lt;SWE.SomeText&gt;&gt;&lt;&lt;SWE.SomeMoreText&gt;&gt;
  </code></pre>
  
  <p>Is there a better way? What about <code>&lt;&lt;SWE.*?&gt;&gt;</code></p>