title: Regex, select Nth match
body: <p>I have a file that contains this:</p>
  
  <pre><code>&lt;Row&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;INC000012486615&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;abcd-efg-hij4-en:ddcs&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;fs-hubraum-apps:kayw-de&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;mn-def-seb01:sfyc-en&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;00055s4dEN&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;General Information&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell ss:StyleID="ce2"&gt;&lt;Data  ss:Type="DateTime"&gt;2017-06-28T16:24:35&lt;/Data&gt;
  &lt;/Cell&gt;&lt;Cell&gt;&lt;Data ss:Type="String"&gt;Public&lt;/Data&gt;&lt;/Cell&gt;
  &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Hi John,
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  Thanks,
  Snow&lt;/Data&gt;&lt;/Cell&gt;  
  &lt;/Row&gt;
  </code></pre>
  
  <p>I wrote a Regex that selects the valuable information: <code>(?&lt;=&lt;Data[^&gt;]*&gt;)((.|\n)*?)(?=&lt;\/Data&gt;)</code>: only selects the data inside inside <code>&lt;Cell&gt;&lt;Data&gt;</code>. You can test on this <a href="http://regexstorm.net/tester?p=%28%3F%3C%3D%3CData%5B%5E%3E%5D*%3E%29%28%28.%7C%5Cn%29*%3F%29%28%3F%3D%3C%5C%2FData%3E%29&amp;i=%3CRow%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3EINC000012486615%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3Eabcd-efg-hij4-en%3Addcs%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3Efs-hubraum-apps%3Akayw-de%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3Emn-def-seb01%3Asfyc-en%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3E00055s4dEN%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3E%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3EGeneral%20Information%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%20ss%3AStyleID%3D%22ce2%22%3E%3CData%20%20ss%3AType%3D%22DateTime%22%3E2017-06-28T16%3A24%3A35%3C%2FData%3E%0D%0A%3C%2FCell%3E%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3EPublic%3C%2FData%3E%3C%2FCell%3E%0D%0A%3CCell%3E%3CData%20ss%3AType%3D%22String%22%3EHi%20John%2C%0D%0ALorem%20ipsum%20dolor%20sit%20amet%2C%20consectetur%20adipiscing%20elit%2C%20sed%20do%20eiusmod%20tempor%20incididunt%20ut%20labore%20et%20dolore%20magna%20aliqua.%20Ut%20enim%20ad%20minim%20veniam%2C%20quis%20nostrud%20exercitation%20ullamco%20laboris%20nisi%20ut%20aliquip%20ex%20ea%20commodo%20consequat.%20Duis%20aute%20irure%20dolor%20in%20reprehenderit%20in%20voluptate%20velit%20esse%20cillum%20dolore%20eu%20fugiat%20nulla%20pariatur.%20Excepteur%20sint%20occaecat%20cupidatat%20non%20proident%2C%20sunt%20in%20culpa%20qui%20officia%20deserunt%20mollit%20anim%20id%20est%20laborum.%0D%0AThanks%2C%0D%0ASnow%3C%2FData%3E%3C%2FCell%3E%20%20%0D%0A%3C%2FRow%3E%0D%0A" rel="nofollow noreferrer">link</a></p>
  
  <p>I would like to be able to select the nth match using Regex: (1st match: <code>INC000012486615</code>, second match <code>abcd-efg-hij4-en:ddcs</code>, etc.)</p>
  
  <p>I wasn't successful modifying my Regex. Any suggestions ?</p>
  
  <p>PS: I have to use Regex. For Splunk Field extraction.</p>