title: Regex to terminate on character or end of line
body: <p>I currently have this (C#):</p>
  
  <pre><code>http:\/\/([^""']*[^""']*).*?((?=&lt;)|(?=$))
  </code></pre>
  
  <p>As you can see i'm trying to use the lookahead to terminate the regex on <code>&lt;</code> or end of line.
  The above is not working :( If i remove the <code>|(?=$)</code> then it will only work if <code>&lt;</code> is in the string. How can I get the regex to terminate when either <code>&lt;</code> or <code>$</code> happens? (Note: I don't want to include the <code>&lt;</code> in my result)</p>
  
  <p>Any pointers would be greatly appreciated.</p>