title: How to write this in different regex flavours
body: <p>I have the following data:</p>
  
  <pre><code>a b c d FROM:&lt;uniquepattern1&gt;
  e f g h TO:&lt;uniquepattern2&gt;
  i j k l FROM:&lt;uniquepattern1&gt;
  m n o p TO:&lt;uniquepattern3&gt;
  q r s t FROM:&lt;uniquepattern4&gt;
  u v w x TO:&lt;uniquepattern5&gt;
  </code></pre>
  
  <p>I would like a regex query that can find the contents of <code>TO:</code> when <code>FROM:&lt;uniquepattern1&gt;</code> is encountered, so the results would be <code>uniquepattern2</code> and <code>uniquepattern3</code>.</p>
  
  <p>I am hopeless with regex, I would appreciate any pointers on how to write this (lookahead parameters?) and any differences between regex on different platforms (eg the C# .NET Regex versus Grep vs Perl) that might be relevant here.</p>
  
  <p>Thank you.</p>